Skip to content

Commit 0951c88

Browse files
committed
Fix procedure load. It always returned no result, instead of the result of the last evaluated expression.
1 parent 3bb478a commit 0951c88

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ framework:
209209
- [SRFI 221: Generator/accumulator sub-library](https://srfi.schemers.org/srfi-221/srfi-221.html)
210210
- [SRFI 222: Compound Objects](https://srfi.schemers.org/srfi-222/srfi-222.html)
211211
- [SRFI 223: Generalized binary search procedures](https://srfi.schemers.org/srfi-223/srfi-223.html)
212-
212+
213213

214214
## Project
215215

Diff for: Sources/LispKit/Primitives/SystemLibrary.swift

+6
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,12 @@ public final class SystemLibrary: NativeLibrary {
340340
switch args.first! {
341341
case .null:
342342
return (CoreLibrary.voidProc, [])
343+
case .pair(let expr, .null):
344+
let code = try Compiler.compile(expr: .pair(expr, .null),
345+
in: .global(try env.asEnvironment()),
346+
optimize: true,
347+
inDirectory: try sourceDir.asString())
348+
return (Procedure(code), [])
343349
case .pair(let expr, let rest):
344350
let source = Expr.pair(
345351
expr,

0 commit comments

Comments
 (0)