Skip to content

Hexlet/multicode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

multicode

Build Status

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));"

About

Hexlet's Codebattle's Clojure code converter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published