mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-30 16:18:58 +00:00
30 lines
1.0 KiB
Forth
30 lines
1.0 KiB
Forth
//------------------------------------------------------------------------------
|
|
// This code was generated by myriad.
|
|
// Changes to this file will be lost when the code is regenerated.
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
namespace ConsumePlugin
|
|
|
|
open WoofWare.Myriad.Plugins
|
|
|
|
/// Catamorphism
|
|
[<RequireQualifiedAccess>]
|
|
module ExprCata =
|
|
/// Execute the catamorphism.
|
|
let runExpr (cata : Cata<'ExprRet, 'ExprBuilderRet>) : 'ExprRet =
|
|
let instructions = ResizeArray ()
|
|
instructions.Add (Instruction.ProcessExpr x)
|
|
let ExprRetStack, ExprBuilderRetStack = loop cata instructions
|
|
Seq.exactlyOne ExprRetStack
|
|
|
|
/// Execute the catamorphism.
|
|
let runExprBuilder (cata : Cata<'ExprRet, 'ExprBuilderRet>) : 'ExprBuilderRet =
|
|
let instructions = ResizeArray ()
|
|
instructions.Add (Instruction.ProcessExprBuilder x)
|
|
let ExprRetStack, ExprBuilderRetStack = loop cata instructions
|
|
Seq.exactlyOne ExprBuilderRetStack
|