basic: rudimentary auto-currying

This commit is contained in:
minjaesong
2020-12-24 17:35:53 +09:00
parent 85334beff8
commit 34696dd51b
3 changed files with 27 additions and 9 deletions

View 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)