mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-09 22:54:03 +09:00
basic: rudimentary auto-currying
This commit is contained in:
6
assets/disk0/home/basic/autocurrytest.bas
Normal file
6
assets/disk0/home/basic/autocurrytest.bas
Normal file
@@ -0,0 +1,6 @@
|
||||
10 DEFUN SINC(P)=SIN(P)/P
|
||||
20 DEFUN OTHERFUN(A,B)=A+"|"+B
|
||||
30 DEFUN PLOTLINE(F,X)=MAP(OTHERFUN<~F(X),1 TO 5):REM needs auto-currying
|
||||
31 DEFUN PLOTLINE2(F,X)=MAP(OTHERFUN<~F<~X,1 TO 5):REM WORKS!
|
||||
100 PRINT PLOTLINE(SINC,333)
|
||||
101 PRINT PLOTLINE2(SINC,333)
|
||||
Reference in New Issue
Block a user