Created
September 17, 2016 04:04
-
-
Save jarble/d4325e5a1a700129a8db20bde0b2c410 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %Java-to-scala translator for SWI-Prolog | |
| :- use_module(library(transpiler)). | |
| :- set_prolog_flag(double_quotes,chars). | |
| :- initialization(main). | |
| main :- | |
| Input = "def add(a:String,b:String):String={return a+b;} def squared(a:Int):Int={return a*a;} def add_exclamation_point(parameter:String):String={return parameter+\"!\";} | |
| ", | |
| translate('scala','java',X), | |
| atom_chars(Y,X), | |
| writeln(Y). |
e516eca
commented
Oct 14, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment