Mercurial > repos > rhope
diff kernel.rhope @ 75:0083b2f7b3c7
Partially working implementation of List. Modified build scripts to allow use of other compilers. Fixed some bugs involving method implementations on different types returning different numbers of outputs. Added Fold to the 'builtins' in the comipler.
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 06 Jul 2010 07:52:59 -0400 |
parents | a844c623c7df |
children | 4d5ea487f810 |
line wrap: on
line diff
--- a/kernel.rhope Thu Jul 01 21:32:08 2010 -0400 +++ b/kernel.rhope Tue Jul 06 07:52:59 2010 -0400 @@ -1,3 +1,6 @@ +Import string.rhope +Import list.rhope +Import functional.rhope Val[in:out] { @@ -345,9 +348,31 @@ } } +Length@Array[arr:out] +{ + out <- [arr]Length >> +} + Call@Array[arr(Array),index(Int32):out] { out <- [arr]Index[index] } +And[left,right:out] +{ + ,out <- If[left] + { + out,out <- If[right] + } +} +Or[left,right:out] +{ + out <- If[left] {} + { + out <- right + } +} + + +