Vocabulary infix Syntax [infix ... infix]
Word description Parses the infix code inside the brackets, converts it to stack code and executes it.
Examples USING: infix prettyprint ;
IN: scratchpad
[infix 8+2*3 infix] .14
[infix isn't that useful by itself, as it can only access literal numbers and no variables. It is designed to be used together with locals; for example with
:: :
USING: infix locals math.functions prettyprint ;
IN: scratchpad
:: quadratic-equation ( a b c -- z- z+ )
[infix (-b-sqrt(b*b-4*a*c)) / (2*a) infix]
[infix (-b+sqrt(b*b-4*a*c)) / (2*a) infix] ;
1 0 -1 quadratic-equation . .1.0
-1.0
Definition
This documentation was generated offline from a
load-all
image. If you want, you can also
browse the documentation from within the UI developer tools . See
the Factor website
for more information.
Factor 0.101 x86.64 (2284, heads/master-29a92525f9, Nov 9 2024 06:55:18)