tricu

A lazy functional language based on Tree Calculus
Log | Files | Refs | README | LICENSE

lists.tri (318B)


      1 !import bd2c14d6db6b69308a5252a8e839705a55d30e815f012900b094315263e08d81 *
      2 !export *
      3 
      4 -- Collect values in a list. Spaces separate items; [] is the empty list.
      5 numbers = [2 4 6]
      6 itemCount = length numbers
      7 total = sum numbers
      8 
      9 -- Try adding another item to numbers, then try numbers = [].
     10 -- Next: Transforming a list.