make python more like clojure
>>> from pyojure import *
>>> mapv(print, dir())
>>> assoc({"this": "is"}, "very", "cool")
{'this': 'is', 'very': 'cool'}
>>> comp(str, inc, int)('123')
'124'
>>> list(partition(2, [1,2,3,4,5,6,7,8,9]))
[[1, 2], [3, 4], [5, 6], [7, 8], [9]]
>>> import pyojure
>>> help(pyojure.core)
- Clojure has much more liberal syntax for identifiers. Standard naming transpositions are attempted.
-
->_
e.g.every-pred
->every_pred
?
predicate suffix ->is_
/has_
/etc. predicate prefix e.g.,odd?
->is_odd
- Some Clojure function names indicate types that are known by different names in Python.
- E.g., the
v
inmapv
refers to the Clojurevector
type, which is equivalent to a Pythonlist
- Both names are provided for now i.e.,
mapv
==mapl
- E.g., the