Skip to content

yitzchak/trivial-do

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

trivial-do

Additional dolist style macros for Common Lisp. Currently provides doalist, dohash, dolist*, doplist, doseq and doseq*.

doalist

Iterates over the key value pairs of an alist.

(doalist (key value alist &optional return-form)
  (format t "key: ~A, value: ~A~%" key value))

dohash

Iterates over the key value pairs of a hash table.

(dohash (key value hash-table &optional return-form)
  (format t "key: ~A, value: ~A~%" key value))

dolist*

Iterates over a list with a position variable tracking the current index.

(dolist* (position value list &optional return-form)
  (format t "position: ~A, value: ~A~%" position value))

doplist

Iterates over the key value pairs of an plist.

(doplist (key value plist &optional return-form)
  (format t "key: ~A, value: ~A~%" key value))

doseq

Iterates over the values of a sequence.

(doseq (value sequence &optional return-form)
  (format t "value: ~A~%" position value))

doseq*

Iterates over a sequence with a position variable tracking the current index.

(doseq* (position value sequence &optional return-form)
  (format t "position: ~A, value: ~A~%" position value))

About

Additional dolist style macros for Common Lisp

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published