This file contains hidden or 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
| add2AndProduct1 : List Int -> Int | |
| add2AndProduct1 list = | |
| List.product (List.map (\e -> e + 2) list) | |
| add2AndProduct2 : List Int -> Int | |
| add2AndProduct2 list = | |
| list | |
| |> List.map (\e -> e + 2) | |
| |> List.product |
This file contains hidden or 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() { | |
| 'use strict'; | |
| function F2(fun) | |
| { | |
| function wrapper(a) { return function(b) { return fun(a,b); }; } | |
| wrapper.arity = 2; | |
| wrapper.func = fun; | |
| return wrapper; |
This file contains hidden or 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
| export default function y (elmApp) { | |
| var globalReader = function () { | |
| var reader = new FileReader() | |
| reader.onload = (function (event) { | |
| elmApp.ports.imageRead.send(event.target.result) | |
| }) | |
| return reader | |
| }() |
This file contains hidden or 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
| # frozen_string_literal: true | |
| class PlacesController < ApplicationController | |
| def index | |
| render json: RIP.get( | |
| :gplaces, | |
| 'autocomplete/json', | |
| input: params[:q] | |
| ) |
This file contains hidden or 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
| moveBottomRight ({ x, y } as coords) = | |
| { coords | x = x + 1, y = y + 1 } | |
This file contains hidden or 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
| all : Test | |
| all = | |
| describe "A Test Suite" | |
| [ test "Collision" <| | |
| \() -> | |
| Expect.false "Collision didn't work" (Character.collision initialKoala initialFlag) | |
| , test "CollisionPosition" <| | |
| \() -> | |
| Expect.false "Initial state of game is loosing" (Game.isLoosing Game.initial) | |
| , test "CollisionPosition" <| |
This file contains hidden or 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
| step : Game -> Position -> Game | |
| step game arrows = | |
| game | |
| |> handleWinning | |
| |> handleLoosing | |
| |> stepCharacter arrows | |
| |> stepEnemies | |
| isWinning : Game -> Bool |
This file contains hidden or 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
| class LogoUploader < CarrierWave::Uploader::Base | |
| include Cloudinary::CarrierWave | |
| def extension_white_list | |
| %w(jpg jpeg gif png) | |
| end | |
| process :convert => 'png' | |
| process :resize_to_limit => [1024, 1024] |
This file contains hidden or 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
| TESTFLIGHT_APP_TOKEN=90210 | |
| TESTFLIGHT_TEAM_TOKEN=90210 | |
| TESTFLIGHT_API_TOKEN=90210 | |
| BUGSENSE_API_KEY=90210 | |
| BUGSENSE_API_TOKEN=90210 | |
| DEVELOPMENT_CERTIFICATE_NAME="iPhone Developer: yourName" | |
| DEVELOPMENT_PROVISIONING_PROFILE_PATH="/path/to/development.mobileprovision" | |
This file contains hidden or 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
| # Array + Hashes | |
| a = [ 1, 'cat', 3.14 ] # array with three elements | |
| puts "The first element is #{a[0]}" | |
| a[2] = nil | |
| puts "The array is now #{a.inspect}" | |
| # -> The first element is 1 |
NewerOlder