PFL Examples

LA home
Computing
FP
 PFL
  Syntax
  Examples
  Interpreter
  Examples

Also see:
  λ egs
  • [buffer] -- bounded buffer process
  • [factorial] -- in parallel ||
  • [server] -- and clients
  • [merge sort]
  • [Prime numbers] -- || sieve
  • [Hamming numbers] -- by || processes
  • [pass actions] -- etc. down channels
  • Deadlock
    let ch1=chan, ch2=chan
    
    in ch1!1 -> ch2!2 -> stop ||
       ch2?x -> ch1?y -> output!x+y -> stop
    
    { Deadlock. }
    
    -- one process wants to interact on ch1 and then (->) on ch2, the other one v.v..--(
www:

pfl...
|   choice
|| parallel
-> sequence
? input act
! output act
chan new channel

↑ © L. Allison, www.allisons.org/ll/   (or as otherwise indicated).
Created with "vi (Linux)",  charset=iso-8859-1,   fetched Sunday, 21-Apr-2019 23:02:25 EDT.

Free: Linux, Ubuntu operating-sys, OpenOffice office-suite, The GIMP ~photoshop, Firefox web-browser, FlashBlock flash on/off.