Generalized Argument Removal - SPECIALIZE:RELAX

Not to deny the utility of this SPECIALISE:RELAX, but this feels like a job for partial application:

append-random: partial [append _ (random 10)]

…well, it would need to make sure the random 10 is run on every function evaluation rather than just once when the function is constructed. But these details can be worked out.

(In Haskell that ‘just works’ thanks to laziness and chucking side-effects into monads. But of course Ren-C doesn’t have either.)

1 Like