all repos — min @ f48896afcaaba3390d9a8c23fa5a8679a37939a5

A small but practical concatenative programming language.

prelude.min

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
// Common Environment Variables
[os "windows" ==] 
  [
    ["HOMEPATH" $] [$HOME] :
    ["USERNAME" $] [$USER] :
  ] 
  [
    ["HOME" $] [$HOME] :
    ["USER" $] [$USER] :   
  ] 
ifte

["PATH" $]  [$PATH]     : 
[$HOME]     [$HOMEPATH] :
[$USER]     [$USERNAME] :


// Mathematical

[1 +] [succ] :
[1 -] [pred] :

[[ dup 0 == ] [ 1 + ] [ dup 1 - ] [ * ] linrec] [factorial] :