Skip to content

Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

utility Manual

Description

A collection of useful macros and functions I use in almost every project.

Installing utility

We can use QuickLisp to load utility:

(ql:quickload :utility)

Some Things inside

  • [macro] (DOHASH ((K V) HASH &body BODY))

    • Iterate through the contents of a hash table.
  • [macro] (ETOUQ (&body BODY))

    • Expand into the macro-time evaluation of BODY.
(etouq (list (car (cons'car 0))
`(quote,(cdr (list012)))))
=> 1
  • [macro] (DOBOX ((&rest INTERVAL-FORMS) &rest BODY))

    • Iterate through all coordinates bounded by the dimensions specified in INTERVAL-FORMS.

Example:

(dobox ((x 02) (y 03)) (print (list x y)))
=> (00) (01) (02) (10) (11) (12)
  • [function] (KEYWORDIFY (SYM))

    • Intern SYM in the keyword package. SYM is a string designator.
  • [macro] (ANY (&body BODY))

    • Expand into a random element of body. Most useful to denote code invariants.
  • [function] (FLOATIFY (X))

    • Coerce X to type 'SINGLE-FLOAT

License Information

This library is released under the MIT License.

About

Yet another personal utility library

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages