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
case class Car(Brand:String) | |
val tuple = ("this","is","a","tuple", 19, Car("Ford")) | |
// iterating over all items | |
tuple.productIterator.foreach(println) | |
/* | |
this | |
is | |
a | |
tuple |
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
package tutorial.webapp | |
import scala.scalajs.js.JSApp | |
object TutorialApp extends JSApp { | |
def main(): Unit = { | |
println("Hello world!") | |
} | |
} |
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
dotPsci: ["src/**/*.purs", "bower_components/**/src/**/*.purs"] | |
// grunt verbose output | |
/* | |
Running "dotPsci" task | |
Running "dotPsci:0" (dotPsci) task | |
Verifying property dotPsci.0 exists in config...OK | |
Files: src/Chapter2/Chapter2.purs -> 0 | |
Reading .psci...OK |
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
{ | |
"name": "playground", | |
"description": "An empty PureScript project.", | |
"keywords": [ | |
"purescript" | |
], | |
"ignore": [ | |
"**/.*", | |
"bower_components", | |
"node_modules", |
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
let isEven :: Number -> Boolean | |
let isEven 0 = false | |
let isEven 1 = false | |
let isEven 2 = true | |
let isEven n = isEven(n-1) |
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
"use strict"; | |
var Prelude = require("Prelude"); | |
var Math = require("Math"); | |
var isEven = function (__copy__36) { | |
var _36 = __copy__36; | |
tco: while (true) { | |
if (_36 === 0) { | |
return false; | |
}; | |
if (_36 === 1) { |
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 Data.Experiments where | |
import Math | |
import Data.Array | |
import Control.MonadPlus | |
(..) :: Number -> Number -> [Number] | |
(..) = range | |
triples :: Number -> [[Number]] | |
triples n = do |
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 Data.Experiments where | |
import Data.Array | |
import Data.Foldable | |
import Data.Path | |
import FileOperations | |
onlyFiles :: Path -> [Path] | |
onlyFiles (Directory name paths) = [] | |
onlyFiles _ = [] |
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
from busybox | |
VOLUME /var/shared | |
RUN touch /var/shared/placeholder | |
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
ENV NGINX_SERVICES_A_ADDRESS 10.0.0.2 | |
ENV NGINX_SERVICES_A_NAME ServiceA | |
ENV NGINX_SERVICES_A_SHORTNAME a | |
ENV NGINX_SERVICES_B_ADDRESS 10.0.0.3 | |
ENV NGINX_SERVICES_B_NAME ServiceB | |
ENV NGINX_SERVICES_B_SHORTNAME b |
OlderNewer