BLisp: A Statically Typed Lisp Like Language

submited by
Style Pass
2021-06-26 11:30:04

BLisp is a statically typed Lisp like programming language which adopts effect system for no_std environments. BLisp supports higher order RPC like higher order functions of functional programming languages.

Pure and IO are function effects. In IO functions, both Pure and IO functions can be called. However, in Pure functions, calling only Pure functions is permitted.

Functions can be defined by defun or export. "defun" defines a local function which cannot be called from Rust’s eval function.

double cannot be called from Rust’s eval, but can be called from internally defined functions. quad can be called from Rust’s eval, and it calls double internally.

It takes 3 integers and returns (Option Int). In order to call Rust’s function, setting a callback function is required as follows.

callback function called from BLisp. The function type must be Fn:(&BigInt, &BigInt, &BigInt) → Option<BigInt>

Leave a Comment