-
Notifications
You must be signed in to change notification settings - Fork 4
Quick Start
Jayson Harshbarger edited this page Apr 17, 2016
·
8 revisions
F♭ is an experiment. Currently, it can be only be used by cloning the github repo.
git clone https://github.com/Hypercubed/f-flat_node.git
cd f-flat_node
npm install
npm start
In the following examples it is assumed the stack is clear
f♭> 1
[ 1 ]
f♭> 2 3
[ 1 2 3 ]
f♭> swap
[ 1 3 2 ]
f♭> drop
[ 1 3 ]
f♭> dup
[ 1 3 3 ]
f♭> clr
[ ]
f♭> 2 5
[ 2 5 ]
f♭> * 1 +
[ 11 ]
f♭> !
[ 39916800 ]
f♭> undo
[ 11 ]
f♭> undo
[ 2 5 ]
f♭> undo
[ ]
f♭> 1 1 +
[ 2 ]
f♭> 2 dup *
[ 4 ]
f♭> -2 sqrt
[ 0+1.4142135623730950488i ]
f♭> sqr: [ dup * ] ;
[ ]
f♭> cube: [ dup dup * * ] ;
[ ]
f♭> 2 sqr
[ 4 ]
f♭> 3 cube
[ 4 27 ]
f♭> i sqr
[ 4 27 -1 ]
f♭> "Hello" println
Hello
[ ]
f♭> 1 1 +
[ 2 ]
f♭> 2 =
[ true ]
f♭> "One plus one is two"
[ true 'One plus one is two' ]
f♭> 'One plus one is not two'
[ true 'One plus one is two' 'One plus one is not two' ]
f♭> choose
[ 'One plus one is two' ]
f♭> [ 20 30 40 ]
[ [ 20 30 40 ] ]
f♭> length
[ 3 ]
f♭> [ 1 2 3 ]
[ [ 1 2 3 ] ]
f♭> [ 4 5 6 ]
[ [ 1 2 3 ] [ 4 5 6 ] ]
f♭> +
[ [ 1 2 3 4 5 6 ] ]
f♭> undo
[ [ 1 2 3 ] [ 4 5 6 ] ]
f♭> <<
[ [ 1 2 3 [ 4 5 6 ] ] ]
f♭> undo
[ [ 1 2 3 ] [ 4 5 6 ] ]
f♭> >>
[ [ [ 1 2 3 ] 4 5 6 ] ]
f♭> { hello: "a greeting" }
[ { hello: 'a greeting' } ]
f♭> { goodbye: "a parting" }
[ { hello: 'a greeting' } { goodbye: 'a parting' } ]
f♭> <<
[ { hello: 'a greeting' goodbye: 'a parting' } ]
f♭> @hello
[ 'a greeting' ]
f♭> "foo"
[ 'foo' ]
f♭> "bar"
[ 'foo' 'bar' ]
f♭> +
[ 'foobar' ]
f♭> 0 @
[ 'f' ]
f♭> "this is a test"
[ 'this is a test' ]
f♭> " "
[ 'this is a test' ' ' ]
f♭> /
[ [ 'this' 'is' 'a' 'test' ] ]
f♭> "this is a test"
[ 'this is a test' ]
f♭> 2 10 slice
[ 'is is a ' ]
- Introduction
- Language
- Words
- Internal
- Definitions
- Examples