https://github.com/hexlet/multicode
Hexlet's Codebattle's Clojure code converter
https://github.com/hexlet/multicode
Last synced: 10 months ago
JSON representation
Hexlet's Codebattle's Clojure code converter
- Host: GitHub
- URL: https://github.com/hexlet/multicode
- Owner: Hexlet
- License: epl-1.0
- Created: 2014-04-05T20:13:13.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2024-08-30T19:51:48.000Z (almost 2 years ago)
- Last Synced: 2025-07-10T20:44:48.445Z (11 months ago)
- Language: Clojure
- Homepage: http://battle.hexlet.io/
- Size: 58.6 KB
- Stars: 9
- Watchers: 14
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# multicode
[](https://travis-ci.org/mokevnin/multicode)
## Description
Transforms code written in Clojure into other languages
## Supported languages
PHP, Python, Ruby, JavaScript
## Develoment
* Install leiningen
## Usage
(prettify-code :ruby
[ '(let [arr [\a \b \c] x 5 z 8]
(assert-equal \b (fetch arr 1 \d))
(assert-equal \d (fetch arr 5 \d))
(assert-equal \c (fetch arr -1 \d))
(assert-equal \d (fetch arr -5 \d)))])
#=>"arr = ['a', 'b', 'c']
x = 5
z = 8
assert_equal('b', fetch(arr, 1, 'd'))
assert_equal('d', fetch(arr, 5, 'd'))
assert_equal('c', fetch(arr, -1, 'd'))
assert_equal('d', fetch(arr, -5, 'd'))"
(prettify-expression :javascript '(assert-equal 3 (fib 4)))
#=>"assertEqual(3, fib(4));"