-
-
Notifications
You must be signed in to change notification settings - Fork 4
random
pannous edited this page Nov 14, 2020
·
3 revisions
The opposite of pure functions are input, output, io and random functions.
time := now
time.input? true # reads time from system
time.random? true # time changes and is somewhat random
time.output? false
Are not all input functions random? No, in some cases, some stability can be assumed on the input.
Todo Pure functions can/cannot? be tainted by io arguments
square:=x*x # pure
square random # pure: random is only invoked once as argument
vs
square random == random()*random()
Todo: rename/add? changing functions vs random