Last active
January 9, 2018 16:53
-
-
Save nebuta/8515545 to your computer and use it in GitHub Desktop.
PureScript string reverse test
This file contains 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
-- Type PureScript code here and click 'Compile' ... | |
-- | |
-- Or select an example from the list at the top right of the page | |
module Main where | |
foreign import reverse "function reverse(s) { return function() { return s.split('').reverse().join(''); }; }" :: String -> String | |
a :: String | |
a = reverse "Hello" | |
-- To use this, from console: | |
-- >> Main.a() | |
-- "olleH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment