mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-05 03:58:40 +00:00
20 lines
320 B
Forth
20 lines
320 B
Forth
namespace ConsumePlugin
|
|
|
|
open WoofWare.Myriad.Plugins
|
|
|
|
[<CreateCatamorphism "MyListCata">]
|
|
type MyList<'a> =
|
|
| Nil
|
|
| Cons of ConsCase<'a>
|
|
|
|
and ConsCase<'a> =
|
|
{
|
|
Head : 'a
|
|
Tail : MyList<'a>
|
|
}
|
|
|
|
[<CreateCatamorphism "MyList2Cata">]
|
|
type MyList2<'a> =
|
|
| Nil
|
|
| Cons of 'a * MyList2<'a>
|