myriad icon indicating copy to clipboard operation
myriad copied to clipboard

Add how-to on creating a generator from scratch

Open 7sharp9 opened this issue 3 years ago • 2 comments

7sharp9 avatar Apr 22 '21 08:04 7sharp9

I have an idea for a case study that would make a good how-to.

A generator that, given a DU type 'a with individual cases of types 'b, 'c, 'd, ..., can generate a function with the signature a' seq -> 'b list * 'c list * 'd list * ...

The function takes a DU type sequence and splits it into separate lists for each case.

travis-leith avatar Apr 23 '21 09:04 travis-leith

tuplising things or listifying things was a plugin that aI would like to do. Such as:

[Myriad.tuple]
myType = ...
let test = myType.create ...

let tupled = MyType.toTuple test
let result = MyType.fromTuple tupled

7sharp9 avatar Apr 23 '21 11:04 7sharp9