Paste: rosetta first-class functions

Author: dondy
Mode: factor
Date: Sun, 10 Feb 2013 14:33:40
Plain Text |
1.5
{ [ sin ] [ cos ] [ 3 ^ ] }
{ [ asin ] [ acos ] [ 1/3 ^ ] }
[ append ] 2map
[ call ] with map
dup pprint ! just to show what we got
[ val equal? ] map

Annotation: revised version

Author: dondy
Mode: factor
Date: Sun, 10 Feb 2013 14:44:34
Plain Text |
USE: math.functions

! http://rosettacode.org/wiki/First-class_functions#Factor
1.5
{ [ sin ] [ cos ] [ 3 ^ ] }
{ [ asin ] [ acos ] [ 1/3 ^ ] }

[ append ] 2map [ call ] with map

[ 1.5 equal? ] map

t [ and ] reduce

New Annotation

Summary:
Author:
Mode:
Body: