Easy modification of places with any given function
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.travis.yml
CHANGELOG.md
LICENSE.md
README.md
trivial-update.asd
trivial-update.lisp

README.md

trivial-update

License MIT Build Status Quicklisp

Easily change place with any supplied function. This library is most useful in cases when you have do deal with places that have complex structure.

Installation

Copy files of this library in any place where ASDF can find them. Then you can use it in system definitions and ASDF will take care of the rest.

Via Quicklisp (recommended):

(ql:quickload "trivial-update")

Description

update place fn &rest args &environment env

Replace value at place by applying function fn to it. Value at place is used as the first argument for the given function fn, other optional arguments args will be used to fill the rest of the argument list. Parameter env is set by Common Lisp implementation during macro expansion.

If value at place should not be put as first argument of given function, use partial application to pad some arguments. Combination of partial application and &rest arguments will give you the opportunity to pass old value at place on any position in the argument list.

Remember that keyword parameters are just pairs of normal arguments.

License

Copyright © 2014–2018 Mark Karpov

Distributed under MIT License.