File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,8 @@ This function expects you to provide a handler, which should call a user-supplie
5353
5454For example, let's say we have an AJAX request function that expects a callback:
5555
56- ``` purescript
57- foreign import ajaxGet """
58- function ajaxGet(callback) { // accepts a callback
56+ ``` javascript
57+ exports .ajaxGet = function (callback ) { // accepts a callback
5958 return function (request ) { // and a request
6059 return function () { // returns an effect
6160 doNativeRequest (request, function (response ) {
@@ -64,7 +63,10 @@ function ajaxGet(callback) { // accepts a callback
6463 }
6564 }
6665}
67- """ :: forall e. (Response -> Eff e Unit) -> Request -> Eff e Unit
66+ ```
67+
68+ ``` purescript
69+ foreign import ajaxGet :: forall e. (Response -> Eff e Unit) -> Request -> Eff e Unit
6870```
6971
7072We can wrap this into an asynchronous computation like so:
You can’t perform that action at this time.
0 commit comments