Skip to content

Latest commit

 

History

History
38 lines (34 loc) · 510 Bytes

README.md

File metadata and controls

38 lines (34 loc) · 510 Bytes

bblang[wip]

no loops(For, While...), just use recursion.
Examples:

fn fib(x: i64)
    when x <= 2 then 1 
    otherwise fib(x - 1) + fib(x - 2);

fib(40);

define a macro:

macro hello
    when ($s: str) then "Hello" + $s
    when ($n: ident) then $n
    otherwise "";

print hello!("bblang");
let a: i64 = 1;
print hello!(a);

map as a macro:

let arr = map!([1, 2, 3] x * x);
print arr

Build

  • ghc
  • cabal
cabal run bblang

Test

cabal run test