tricu

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

names-values.tri (627B)


      1 !export *
      2 
      3 -- Welcome to tricu! Anything after -- on a line is a comment.
      4 -- tricu is a lazy functional language based on tree calculus.
      5 
      6 -- Click or tap underlined definition names to inspect their values.
      7 -- Function calls can have names too; we'll try that in "Your first function".
      8 -- Edits compile after a pause. IO programs offer "Run IO" inside their card.
      9 
     10 -- tricu offers string literals,
     11 greeting = "Hello, world!"
     12 
     13 -- natural number literals (whole numbers starting at zero),
     14 answer = 42
     15 
     16 -- list literals,
     17 greetAndAnswer = [greeting answer]
     18 
     19 -- and more! Choose "Doing arithmetic" from the "Program" dropdown next.