home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / language / j32.sit / tut / TUT38.JS < prev    next >
Text File  |  1991-06-13  |  353b  |  26 lines

  1.        FUNCTIONAL PROGRAMMING Ma
  2.    bc=. 0&, + ,&0
  3.    bc 1
  4. 1 1
  5.    bc bc 1
  6. 1 2 1
  7.    bc bc bc 1
  8. 1 3 3 1
  9.    q=. '$.=.1,y.#2'
  10.    r=. 'f=. ]' ; 'f=. x.&f f.'
  11.    power=. (q;r) : 2
  12.    bc power 3 (1)
  13. 1 3 3 1
  14.    bc ^: 3 (1)
  15. 1 3 3 1
  16.    c3=. (0&,+,&0) ^: 3
  17.    c3 1
  18. 1 3 3 1
  19.    2&* ^: 3"0 i. 5
  20. 0 8 16 24 32
  21.    2&+ ^: 3"0 i. 5
  22. 6 7 8 9 10
  23.    g=. *~ : -
  24.    5 g g 4
  25. _11
  26.