Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexknauth/mutable-match-lambda
extendable mutable functions
https://github.com/alexknauth/mutable-match-lambda
Last synced: about 1 month ago
JSON representation
extendable mutable functions
- Host: GitHub
- URL: https://github.com/alexknauth/mutable-match-lambda
- Owner: AlexKnauth
- License: mit
- Created: 2015-03-30T10:27:43.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2020-10-01T01:28:51.000Z (over 4 years ago)
- Last Synced: 2024-10-16T02:55:20.724Z (3 months ago)
- Language: Racket
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
mutable-match-lambda [![Build Status](https://travis-ci.org/AlexKnauth/mutable-match-lambda.png?branch=master)](https://travis-ci.org/AlexKnauth/mutable-match-lambda)
===extendable mutable functions
documentation: http://pkg-build.racket-lang.org/doc/mutable-match-lambda/index.html
```racket
> (define my+ (mutable-match-lambda))
> my+
#
> (mutable-match-lambda-add-clause! my+ #:match-lambda* [(list (? number? ns) ...) (apply + ns)])
> (my+ 1 2)
3
> (mutable-match-lambda-add-clause! my+ #:match-lambda* [(list (? vector? vs) ...) (apply vector-map + vs)])
> (my+ #(1 2) #(3 4))
'#(4 6)
```