general¶
fun mlprint()
TBD
meth :WeakMapT()
TBD
fun assign(Var: any, Value: any): any
Functional equivalent of
Var := Value
.fun call(Fn: any, Arg₁: any, ..., Argₙ: any): any
Returns
Fn(Arg₁, ..., Argₙ)
.fun cas(Var: any, Old: any, New: any): any
If the value of
Var
is identically equal toOld
, then setsVar
toNew
and returnsNew
. Otherwise leavesVar
unchanged and returnsnil
.var X := 10 cas(X, 10, 11) :> 11 X :> 11 cas(X, 20, 21) :> nil X :> 11
fun copy(Value: any, Fn?: function): any
Returns a copy of
Value
using a newcopy
instance which appliesFn(Copy, Value)
to each value. If omitted,Fn
defaults to:copy
.fun deref(Value: any): any
Returns the dereferenced value of
Value
.fun exchange(Var₁: any, ..., Varₙ: any)
Assigns
Varᵢ := Varᵢ₊₁
for each1 <= i < n
andVarₙ := Var₁
.fun findall(Value: any, Filter?: boolean|type): list
Returns a list of all unique values referenced by
Value
(includingValue
).fun isconstant(Value: any): any | nil
Returns
some
if it is a constant (i.e. directly immutable and not referencing any mutable values), otherwise returnsnil
.isconstant(1) :> 1 isconstant(1.5) :> 1.5 isconstant("Hello") :> "Hello" isconstant(true) :> true isconstant([1, 2, 3]) :> nil isconstant((1, 2, 3)) :> (1, 2, 3) isconstant((1, [2], 3)) :> nil
fun replace(Var₁: any, ..., Varₙ: any, Value: any)
Assigns
Varᵢ := Varᵢ₊₁
for each1 <= i < n
andVarₙ := Value
. Returns the old value ofVar₁
.fun visit(Value: any, Fn: function): any
Returns
Fn(V, Value)
whereV
is a newly createdvisitor
.type event
TBD
type focusevent < event
TBD
type keyboardevent < event
TBD
meth (Arg₁: keyboardevent):alt
TBD
meth (Arg₁: keyboardevent):code
TBD
meth (Arg₁: keyboardevent):ctrl
TBD
meth (Arg₁: keyboardevent):key
TBD
meth (Arg₁: keyboardevent):locale
TBD
meth (Arg₁: keyboardevent):location
TBD
meth (Arg₁: keyboardevent):meta
TBD
meth (Arg₁: keyboardevent):repeat
TBD
meth (Arg₁: keyboardevent):shift
TBD
meth (Arg₁: keyboardevent):timestamp
TBD
type mouseevent < event
TBD
meth (Arg₁: mouseevent):alt
TBD
meth (Arg₁: mouseevent):button
TBD
meth (Arg₁: mouseevent):buttons
TBD
meth (Arg₁: mouseevent):canvasX
TBD
meth (Arg₁: mouseevent):canvasY
TBD
meth (Arg₁: mouseevent):clientX
TBD
meth (Arg₁: mouseevent):clientY
TBD
meth (Arg₁: mouseevent):ctrl
TBD
meth (Arg₁: mouseevent):meta
TBD
meth (Arg₁: mouseevent):movementX
TBD
meth (Arg₁: mouseevent):movementY
TBD
meth (Arg₁: mouseevent):screenX
TBD
meth (Arg₁: mouseevent):screenY
TBD
meth (Arg₁: mouseevent):shift
TBD
meth (Arg₁: mouseevent):targetX
TBD
meth (Arg₁: mouseevent):targetY
TBD
meth (Arg₁: mouseevent):timestamp
TBD
fun mlafter(Arg₁: number, Arg₂: function)
TBD
fun mlevent(Arg₁: string, Arg₂: string, Arg₃: function)
TBD
type uievent < event
TBD
type visitor < function
Used to apply a transformation recursively to values.
fun (V: visitor)(Value: any, Result: any): any
Adds the pair
(Value, Result)
toV
's cache and returnsResult
.fun (V: visitor)(Value: any): any
Visits
Value
withV
returning the result.
meth (Visitor: visitor):const(Value: any): any
Default visitor implementation, just returns
Value
.meth (Visitor: visitor):copy(Value: any): any
Default visitor implementation, just returns
Value
.meth (Visitor: visitor):visit(Value: any): any
Default visitor implementation, just returns
nil
.type weakmap
TBD
meth (Arg₁: weakmap):insert(Arg₂: string)
TBD
type weakmaptoken
TBD
meth (Arg₁: string::buffer):append(Arg₂: weakmaptoken)
TBD
type wheelevent < event
TBD