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
(ns rxjsclj.core | |
(:require [Rx])) | |
(defn stream-for [x] | |
(.map (.interval js/Rx.Observable 2000) x)) | |
(def providers (.from js/Rx.Observable [1 2 3])) | |
(-> (stream-for providers) | |
(.concatMap #(.map % stream-for)) |
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
(function (originalOpen) { | |
XMLHttpRequest.prototype.open = function (method, url, async, user, password) { | |
if (url.match(/limits/)) url = "REJECTED"; | |
originalOpen.call(this, method, url, async, user, password); | |
}; | |
})(XMLHttpRequest.prototype.open); |
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
import Data.List | |
main = do | |
putStrLn "Welcome to the contacts list program!" | |
mainMenu [] -- initial contacts list state | |
mainMenu :: [String] -> IO b | |
mainMenu contacts = do | |
putStrLn "1 - Add new contacts; 2 - Show contacts; 3 - Sort contacts" |
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
x |> f = f x | |
something x = repeat x | |
|> filter (> 3) | |
|> map (+ 1) | |
|> take 5 |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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
Verifying that +rchaves is my blockchain ID. https://onename.com/rchaves |
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
module Tests exposing (..) | |
import Test exposing (..) | |
import Expect | |
import Fuzz exposing (list, int, tuple, string) | |
import String | |
all : Test | |
all = |
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
module Main exposing (..) | |
import ElmTest exposing (..) | |
import Example | |
tests : Test | |
tests = | |
Example.tests |
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
module Main where | |
import Task | |
import Console exposing (..) | |
import Graphics.Element exposing (Element) | |
import ElmTest exposing (..) | |
import Example | |
tests : 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
var gulp = require('gulp'), | |
shell = require('gulp-shell'); | |
gulp.task('build-tests', shell.task([ | |
'elm-make --warn test/TestRunner.elm --output test.js' | |
])) | |
gulp.task('run-tests', ['build-tests'], shell.task([ | |
'node test.js' | |
])) |