~/bend-docscommunity

lisp.bend checks

raw source on the hub · import 0x9fc0cec754888f0fecabce899ddf2ee5/lisp.bend as Lisp

1 import
import Base

Types

type LExp source · line 17 · raw

Data

type LK source · line 36 · raw

Data

type LTask source · line 48 · raw

Data

Definitions

def l_cons source · line 54 · raw

@+a:LExp -> @+b:LExp -> LExp

def l_car source · line 57 · raw

@+e:LExp -> LExp

def l_cdr source · line 64 · raw

@+e:LExp -> LExp

def l_is_atom source · line 71 · raw

@+e:LExp -> Bool

def l_bool source · line 78 · raw

@b:Bool -> LExp

def l_eq source · line 86 · raw

@+a:LExp -> @+b:LExp -> Bool

McCarthy eq: atoms only, like the original.

def l_append source · line 116 · raw

@+a:LExp -> @+b:LExp -> LExp

PG's append. (non-lists pass through so l_append_nil holds generally.)

def l_bind source · line 126 · raw

@+ps:LExp -> @+vs:LExp -> @env:Map<&2, LExp> -> Map<&2, LExp>

PG's pair.: zip param names with arg values into the env.

def l_pick source · line 135 · raw

@r:Pair(Map<&2, LExp>, LExp) -> LExp

def l_run source · line 139 · raw

@+f:Nat -> @+t:LTask -> LExp

def l_eval source · line 240 · raw

@+f:Nat -> @+e:LExp -> LExp

def l_batch source · line 244 · raw

@+f:Nat -> @+es:List<&2, LExp> -> List<&2, LExp>

Whole programs are independent: fork-join over the list.

def l_batch_gpu source · line 252 · raw

@+f:Nat -> @+es:List<&2, LExp> -> List<&2, LExp>

def main source · line 255 · raw

List<&2, LExp>