diff options
| author | Drahflow <drahflow@gmx.de> | 2014-03-11 18:35:06 +0100 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2014-03-11 18:35:06 +0100 |
| commit | 322d8de9f2d5a4b7159c72d36add03e29dcbe5c2 (patch) | |
| tree | d0e458075ae1fe8175890947042e748c5d7333f5 /examples/working-compiler/curry.test | |
| parent | cb4411da6072cccf0030e5f2c1eb4bbd57a6a14a (diff) | |
(Slow) abstract data types
Diffstat (limited to 'examples/working-compiler/curry.test')
| -rw-r--r-- | examples/working-compiler/curry.test | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/working-compiler/curry.test b/examples/working-compiler/curry.test new file mode 100644 index 0000000..f641fb0 --- /dev/null +++ b/examples/working-compiler/curry.test @@ -0,0 +1,25 @@ +{ _ ==f _ sys .typed .inputs ==inputs + sys .typed .outputs ==outputs + inputs len 2 lt { f } { + { "t from curry should never execute" die } + [ inputs len 1 sub inputs * ] outputs '' ==t + 0 inputs len 2 sub range reverse { ==i t [ i inputs * ] [ t ] '' =t } each + 1 inputs len range reverse { ==i + f < =*g { { g }_ } > -- [ i inputs * ] [ t ] '' =f + 0 t sys .typed .outputs * =t + } each + f + } ? * +} /curry deffd + +|add curry ==a +5 5 a * * dump + +a sys .typed .inputs dump +a sys .typed .outputs _ dump 0 -01 * ==b +b sys .typed .inputs dump +b sys .typed .outputs _ dump 0 -01 * ==c + +3 3 |a |a mul * * dump + +# vim: syn=elymas |
