RosettaCodeData/Task/First-class-functions-Use-numbers-analogously/Quackery/first-class-functions-use-numbers-analogously.quackery
2025-02-27 18:35:13 -05:00

14 lines
760 B
Text

[ $ "bigrat.qky" loadfile ] now!
[ 2 1 ] is x ( --> n/d )
[ 1 2 ] is xi ( --> n/d )
[ 4 1 ] is y ( --> n/d )
[ 1 4 ] is yi ( --> n/d )
[ x y v+ ] is z ( n/d n/d --> n/d )
[ x y v+ 1/v ] is zi ( n/d n/d --> n/d )
[ ' [ v* v* ] join join ] is multiplier ( x n/d --> [ )
' xi ' [ 1 2 ] multiplier dup echo x rot do say " applied to x gives: " vulgar$ echo$ cr
' yi ' [ 1 2 ] multiplier dup echo y rot do say " applied to y gives: " vulgar$ echo$ cr
' zi ' [ 1 2 ] multiplier dup echo z rot do say " applied to z gives: " vulgar$ echo$ cr