Skip to content

Instantly share code, notes, and snippets.

@nebuta
Last active January 9, 2018 16:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nebuta/8515545 to your computer and use it in GitHub Desktop.
Save nebuta/8515545 to your computer and use it in GitHub Desktop.
PureScript string reverse test
-- 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