(CommandList children: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} { (BracedVarSub token: <VSub_Name SPECIALFORMS_LAMBDA_SH> suffix_op: (StringUnary op_id:VTest_Plus arg_word:{(true)}) spids: [9 13] ) } {(Lit_Other ']')} ) (ControlFlow token:<ControlFlow_Return return>) ] ) (Assignment keyword: Assign_Declare flags: [-g] pairs: [ (assign_pair lhs: (LhsName name:SPECIALFORMS_LAMBDA_SH) op: Equal rhs: {(true)} spids: [25] ) ] spids: [21] ) (C {(.)} { (BracedVarSub token: <VSub_Name BASH_SOURCE> suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')}) spids: [31 36] ) (/common.sh) } ) (C {(.)} { (BracedVarSub token: <VSub_Name BASH_SOURCE> suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')}) spids: [41 46] ) (/test.sh) } ) (C {(.)} { (BracedVarSub token: <VSub_Name BASH_SOURCE> suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')}) spids: [51 56] ) (/specialforms.sh) } ) (C {(.)} { (BracedVarSub token: <VSub_Name BASH_SOURCE> suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')}) spids: [61 66] ) (/callable.lambda.sh) } ) (FuncDef name: 'evaluator::specialforms::lambda' body: (BraceGroup children: [ (Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (LhsName name:env) op: Equal rhs: {(DQ (${ VSub_Number 1))} spids: [147] ) ] spids: [145] ) (Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (LhsName name:functionName) op: Equal rhs: {(DQ (${ VSub_Number 2))} spids: [157] ) ] spids: [155] ) (Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (LhsName name:args) op: Equal rhs: {(DQ (${ VSub_Number 3))} spids: [170] ) ] spids: [168] ) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (length) } {($ VSub_Name '$args')} ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_Declare flags: [-i] pairs: [ (assign_pair lhs: (LhsName name:length) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} spids: [198] ) ] spids: [194] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: Redir_Less left: {($ VSub_Name '$length')} right: {(2)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(stderr)} {(DQ ('usage: (if condition true-branch false-branch)'))}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 219] ) ] spids: [16777215 234] ) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (first) } {($ VSub_Name '$args')} ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (LhsName name:formalArgs) op: Equal rhs: {(${ VSub_Name RESULT)} spids: [252] ) ] spids: [250] ) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (rest) } {($ VSub_Name '$args')} ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_Declare pairs: [ (assign_pair lhs: (LhsName name:expressions) op: Equal rhs: {(${ VSub_Name RESULT)} spids: [272] ) ] spids: [270] ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (Lambda) (Lit_Other ':') (Lit_Other ':') (new)} {(DQ (${ VSub_Name env) (' ') (${ VSub_Name formalArgs) (' ') (${ VSub_Name expressions))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RESULT) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} spids: [302] ) ] spids: [302] ) ] spids: [142] ) spids: [130 141] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Number '$0')} {(KW_Bang '!') (Lit_Other '=')} {($ VSub_Name '$BASH_SOURCE')} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(ControlFlow token:<ControlFlow_Return return>)] spids: [16777215 334] ) ] spids: [16777215 339] ) (Sentence child:(C {(createTestEnv)}) terminator:<Op_Semi ';'>) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:env) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} spids: [358] ) ] spids: [358] ) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new)} ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:command) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} spids: [375] ) ] spids: [375] ) (C {(appendToList)} {($ VSub_Name '$command')} {(Identifier)} {(DQ (lambda))}) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new)} ) terminator: <Op_Semi ';'> ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (append)} {($ VSub_Name '$command')} {($ VSub_Name '$RESULT')} ) (C {(appendToList)} {($ VSub_Name '$command')} {(Integer)} {(1)}) (Sentence child: (C {(evaluator) (Lit_Other ':') (Lit_Other ':') (eval)} {($ VSub_Name '$env')} {($ VSub_Name '$command')} ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:lambda) op: Equal rhs: {(${ VSub_Name RESULT)} spids: [437] ) ] spids: [437] ) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (toSexp)} {(DQ (${ VSub_Name lambda))}) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(DQ ('(lambda () 1)'))} {(DQ (${ VSub_Name RESULT))} {(DQ ('(lambda () 1)'))} ) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (Lambda) (Lit_Other ':') (Lit_Other ':') (getEnv)} {($ VSub_Name '$lambda')} ) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {($ VSub_Name '$env')} {($ VSub_Name '$RESULT')} {(DQ ('<original env> = <stored env>'))} ) (Sentence child:(C {(createTestEnv)}) terminator:<Op_Semi ';'>) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:env) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} spids: [520] ) ] spids: [520] ) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new)} ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:command) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} spids: [537] ) ] spids: [537] ) (C {(appendToList)} {($ VSub_Name '$command')} {(Identifier)} {(DQ (lambda))}) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new)} ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:argList) op: Equal rhs: {(${ VSub_Name RESULT)} spids: [566] ) ] spids: [566] ) (C {(appendToList)} {(${ VSub_Name argList)} {(Identifier)} {(a)} {(Identifier)} {(b)} {(Identifier)} {(c)} ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (append)} {($ VSub_Name '$command')} {($ VSub_Name '$argList')} ) (C {(appendToList)} {($ VSub_Name '$command')} {(Integer)} {(1)}) (Sentence child: (C {(evaluator) (Lit_Other ':') (Lit_Other ':') (eval)} {($ VSub_Name '$env')} {($ VSub_Name '$command')} ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:lambda) op: Equal rhs: {(${ VSub_Name RESULT)} spids: [622] ) ] spids: [622] ) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (toSexp)} {(DQ (${ VSub_Name lambda))}) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(DQ ('(lambda (a b c) 1)'))} {(DQ (${ VSub_Name RESULT))} {(DQ ('(lambda (a b c) 1)'))} ) (Sentence child:(C {(createTestEnv)}) terminator:<Op_Semi ';'>) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:env) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} spids: [678] ) ] spids: [678] ) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new)} ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:command) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} spids: [695] ) ] spids: [695] ) (C {(appendToList)} {($ VSub_Name '$command')} {(Identifier)} {(DQ (lambda))}) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new)} ) terminator: <Op_Semi ';'> ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (append)} {($ VSub_Name '$command')} {($ VSub_Name '$RESULT')} ) (C {(appendToList)} {($ VSub_Name '$command')} {(Identifier)} {(x)} {(Identifier)} {(y)}) (Sentence child: (C {(evaluator) (Lit_Other ':') (Lit_Other ':') (eval)} {($ VSub_Name '$env')} {($ VSub_Name '$command')} ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:lambda) op: Equal rhs: {(${ VSub_Name RESULT)} spids: [761] ) ] spids: [761] ) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (toSexp)} {(DQ (${ VSub_Name lambda))}) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(DQ ('(lambda () x y)'))} {(DQ (${ VSub_Name RESULT))} {(DQ ('(lambda () x y)'))} ) (Sentence child:(C {(createTestEnv)}) terminator:<Op_Semi ';'>) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:env) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} spids: [817] ) ] spids: [817] ) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new)} ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:command) op: Equal rhs: {(DQ (${ VSub_Name RESULT))} spids: [834] ) ] spids: [834] ) (C {(appendToList)} {($ VSub_Name '$command')} {(Identifier)} {(DQ (lambda))}) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new)} ) terminator: <Op_Semi ';'> ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (append)} {($ VSub_Name '$command')} {($ VSub_Name '$RESULT')} ) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new)} ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:sc1) op:Equal rhs:{(${ VSub_Name RESULT)} spids:[886])] spids: [886] ) (C {(appendToList)} {($ VSub_Name '$sc1')} {(Identifier)} {(Lit_Other '+')} {(Integer)} {(1)} {(Integer)} {(2)} ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (append)} {($ VSub_Name '$command')} {($ VSub_Name '$sc1')} ) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (new)} ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:sc2) op:Equal rhs:{(${ VSub_Name RESULT)} spids:[930])] spids: [930] ) (C {(appendToList)} {($ VSub_Name '$sc2')} {(Identifier)} {(Lit_Other '+')} {(Integer)} {(2)} {(Integer)} {(3)} ) (C {(variable) (Lit_Other ':') (Lit_Other ':') (LinkedList) (Lit_Other ':') (Lit_Other ':') (append)} {($ VSub_Name '$command')} {($ VSub_Name '$sc2')} ) (Sentence child: (C {(evaluator) (Lit_Other ':') (Lit_Other ':') (eval)} {($ VSub_Name '$env')} {($ VSub_Name '$command')} ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:lambda) op: Equal rhs: {(${ VSub_Name RESULT)} spids: [975] ) ] spids: [975] ) (Sentence child: (C {(variable) (Lit_Other ':') (Lit_Other ':') (toSexp)} {(DQ (${ VSub_Name lambda))}) terminator: <Op_Semi ';'> ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (equals)} {(DQ ('(lambda () (+ 1 2) (+ 2 3))'))} {(DQ (${ VSub_Name RESULT))} {(DQ ('(lambda () (+ 1 2) (+ 2 3))'))} ) (C {(assert) (Lit_Other ':') (Lit_Other ':') (report)}) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} { (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_Plus arg_word:{(isset)}) spids: [1028 1032] ) } {(Lit_Other ']')} ) (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=') (Lit_Other '=')} {(DQ (debug))} {(Lit_Other ']')} ) ] ) terminator: <Op_Semi ';'> ) ] action: [(C {(variable) (Lit_Other ':') (Lit_Other ':') (printMetadata)})] spids: [16777215 1054] ) ] spids: [16777215 1063] ) ] )