https://github.com/zweifisch/ob-kotlin
org-babel functions for kotlin evaluation
https://github.com/zweifisch/ob-kotlin
kotlin literate-programming org-babel org-mode
Last synced: 9 months ago
JSON representation
org-babel functions for kotlin evaluation
- Host: GitHub
- URL: https://github.com/zweifisch/ob-kotlin
- Owner: zweifisch
- Created: 2015-03-12T13:24:49.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2021-02-03T19:25:23.000Z (over 5 years ago)
- Last Synced: 2023-04-09T21:22:25.476Z (over 3 years ago)
- Topics: kotlin, literate-programming, org-babel, org-mode
- Language: Emacs Lisp
- Size: 3.91 KB
- Stars: 8
- Watchers: 3
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* ob-kotlin
[[https://melpa.org/#/ob-kotlin][file:https://melpa.org/packages/ob-kotlin-badge.svg]]
org-babel functions for kotlin evaluation
tested kotlin versions:
- 1.1.2-5
- 1.2.61
** options
| option | example |
|----------+-----------------------|
| =:session= | =:session mysession= |
| =:file= | =:file /tmp/output.png= |
** examples
: #+BEGIN_SRC kotlin
: (1..100).filter {it % 19 == 0}.reduce {a,b -> a + b}
: #+END_SRC
:
: #+RESULTS:
: : 285
: #+BEGIN_SRC kotlin
: fun fib(n: Int):Int {
: return when (n) {
: 0,1 -> 1
: else -> fib(n - 1) + fib(n - 2)
: }
: }
:
: fib(19)
: #+END_SRC
:
: #+RESULTS:
: : 6765