Skip to content

Commit

Permalink
notes
Browse files Browse the repository at this point in the history
  • Loading branch information
BostX committed Dec 7, 2023
1 parent e21d965 commit ce79d99
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions notes/guix-guile-nix/guile.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
https://sourcehut.org
https://codeberg.org

alist - association list, i.e. dictionary
https://www.gnu.org/software/guile/manual/html_node/Alist-Example.html

(define circular-list (let ((x '(1 2 3))) (set-cdr! (cddr x) x) x))
(length+ circular-list) ;; => #f

alist - association list, i.e. dictionary
https://www.gnu.org/software/guile/manual/html_node/Alist-Example.html
@lisp{
(define capitals '(("New York" . "Albany")
("Oregon" . "Salem")
Expand All @@ -25,6 +24,13 @@
}
plist - property list (see plist in emacs-lisp)

(use-modules (ice-9 hash-table))
(define ht (make-hash-table))
(hash-set! ht "one" 1)
(hash-set! ht "two" 2)
(hash-set! ht "three" 3)
(hash-for-each (lambda (key value) (format #t "~a => ~a~%" key value)) ht)

Create and publish Guile projects
https://gitlab.com/a-sassmannshausen/guile-hall

Expand Down

0 comments on commit ce79d99

Please sign in to comment.