Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
REM Create some functions for testing:
|
||||
DEF FNsqr(a) = SQR(a)
|
||||
DEF FNabs(a) = ABS(a)
|
||||
|
||||
REM Create the function composition:
|
||||
SqrAbs = FNcompose(FNsqr(), FNabs())
|
||||
|
||||
REM Test calling the composition:
|
||||
x = -2 : PRINT ; x, FN(SqrAbs)(x)
|
||||
END
|
||||
|
||||
DEF FNcompose(RETURN f%, RETURN g%)
|
||||
LOCAL f$, p% : DIM p% 7 : p%!0 = f% : p%!4 = g%
|
||||
f$ = "(x)=" + CHR$&A4 + "(&" + STR$~p% + ")(" + \
|
||||
\ CHR$&A4 + "(&" + STR$~(p%+4) + ")(x))"
|
||||
DIM p% LEN(f$) + 4 : $(p%+4) = f$ : !p% = p%+4
|
||||
= p%
|
||||
Loading…
Add table
Add a link
Reference in a new issue