Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kalimehtar/message-oo
Message-passing Smalltalk-style object system
https://github.com/kalimehtar/message-oo
Last synced: about 1 month ago
JSON representation
Message-passing Smalltalk-style object system
- Host: GitHub
- URL: https://github.com/kalimehtar/message-oo
- Owner: Kalimehtar
- Created: 2013-01-11T17:28:06.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-05-28T07:34:53.000Z (over 11 years ago)
- Last Synced: 2024-10-16T03:02:19.964Z (3 months ago)
- Language: Common Lisp
- Size: 129 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Message OO
==========This package gives you the great opportunity of real object-oriented
programming.For example, you may write
(use-package :message-oo)
(defmessage list (:add item) (append list (list item)))
(defmessage list (:map func) (mapcar func list))
(defmessage list (:reduce func) (reduce func list))
(defmessage number (:+ number2 &rest numbers)
(apply '+ number number2 numbers))(@ nil
(:add 1)
(:add 2)
(:add 3)
(:map (@ '(:+ 3) :fn))
(reduce #'+)) => 15You may think of last command as nil.add(1).add(2).add(3).map(..).reduce(...)
Every next step is applied to the result of previous as in UNIX shell pipeline.
Enjoy!