This is an alternative implementation of GRP, that compiles to C.
GRP is a dynamically-typed, stack-based programming language, with the goal of being approachable to begginers, but also satifsy more advanced needs.
10 Print
Output:
10
All built-in functions in GRP have operator variants, here a a few intresting ones:
Plus ; +
Minus ; -
Times ; *
Div ; /
Print ; <?
Show ; ?
Map ; <$>
Filter ; <&>
Reduce ; <.>
Sum ; <+>
Product ; <*>
Concat ; ++
Head ; <*
Tail ; *>>
Length ; #
Cons ; :>
You can define a custom variable/function/operator as follows:
MyNumber (@) :: 10 5 + ::
And then you can use as follows:
MyNumber <?
; or
@ <?
; (<? is the 'Print' operator)
Note that the operator form is optional, and you do not need to include it when defining a new variable