Skip to content

Commit 8bc8572

Browse files
committed
v0.7 notes and docs
1 parent f4aee8f commit 8bc8572

File tree

7 files changed

+2807
-2588
lines changed

7 files changed

+2807
-2588
lines changed

docs/bassics.html

Lines changed: 932 additions & 932 deletions
Large diffs are not rendered by default.

docs/guide.html

Lines changed: 444 additions & 442 deletions
Large diffs are not rendered by default.

docs/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/stdlib.html

Lines changed: 1416 additions & 1211 deletions
Large diffs are not rendered by default.

notes/v0.7.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
More tweaks and polish on the path towards stability.

pkg/bass/ground.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,10 @@ func init() {
777777

778778
Ground.Set("binds?",
779779
Func("binds?", "[scope sym]", (*Scope).Binds),
780-
`returns true if the scope has a value bound to the given symbol`)
780+
`returns true if the scope has a value bound to the given symbol`,
781+
`=> (binds? {:x 1} :x)`,
782+
`=> (binds? {} :x)`,
783+
`=> (binds? (current-scope) :binds?)`)
781784
}
782785

783786
type primPred struct {

std/root.bass

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,16 @@
535535
(defn run [thunk]
536536
((start thunk (fn [err] (and err (err))))))
537537

538-
; runs the body if test returns true
538+
; evaluates the body if test returns true
539539
;
540540
; Returns the body's result, or null if the test is false.
541+
;
542+
; => (when true (def x :a) (log "hello") (log "world") x)
543+
;
544+
; => x
545+
;
546+
; => (when false (def x :b))
547+
;
548+
; => x
541549
(defop when [test & body] scope
542550
(eval [if test [do & body] null] scope))

0 commit comments

Comments
 (0)