tricu

An interpreted language for exploring Tree Calculus
Log | Files | Refs | README | LICENSE

consumer-unit.scp (490B)


      1 -- Deliberately use forward references. Only the build supplies Lib.identity.
      2 consumer configure
      3   _ @ _ =>
      4     call ("scp-worker.v1", (leaf, Self.makeWorker))
      5       (leaf, Lib.identity) as worker in [("identity", worker) | []]
      6 
      7 consumer forwarded
      8   x @ _ => call ("scp-worker.v1", (leaf, Self.identity)) x as answer in answer
      9 
     10 consumer shadow
     11   Lib @ _ => (Lib, Lib.identity)
     12 
     13 consumer identity
     14   x @ _ => x
     15 
     16 consumer makeWorker
     17   (initial, code) @ _ => ("scp-worker.v1", (initial, code))