Guest User

Untitled

a guest
Nov 28th, 2017
67
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MyMap L Lout A B1 B2 C F in
  2.    MyMap = proc {$ Xs F R}
  3.       case Xs
  4.       of nil then
  5.      R = nil
  6.       [] X|Xr then
  7.      local T A in
  8.         {F X A}
  9.         {MyMap Xr F T}
  10.         R = A|T
  11.      end
  12.      
  13.       end
  14.    end
  15.    
  16.    L = [1 2 3 4]
  17.    F = proc {$ X R}
  18.       local P in
  19.          P = proc{$ R1}
  20.             R1 = X*X
  21.          end
  22.          {ByNeed P R1}
  23.       end
  24.        end
  25.    {MyMap L F Lout}
  26.    A = Lout.1
  27.    B1 = Lout.2
  28.    B2 = B1.1
  29.    C = A + B2
  30.    {Browse C}
  31. end
RAW Paste Data