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
type ExpressM a = forall e. Eff (express :: Express | e) a | |
data HandlerM a = HandlerM (Request -> Response -> ExpressM Unit -> ExpressM a) | |
instance monadEffHandlerM :: MonadEff eff HandlerM where | |
liftEff act = HandlerM \_ _ _ -> unsafeInterleaveEff act |
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
module Trello | |
( BoardId() | |
, Credentials() | |
, Trello() | |
, runTrello | |
, Board() | |
, getBoard | |
) where | |
import Data.Maybe |
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
type Writer<'Result, 'Output> = | |
| W of 'Result * seq<'Output> | |
type WriterBuilder() = | |
member this.Zero() = W ((), Seq.empty) | |
member this.Yield(x) = W (x, Seq.empty) | |
member this.Return(x) = this.Yield(x) | |
member this.Bind(W (a, xs), k) = | |
let (W (b, ys)) = k a | |
W (b, Seq.append xs ys) |
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
Device.OnPlatform <| function | |
| iOS, Tablet -> | |
this.Padding <- Thickness(0, 0, 0, 0) | |
| _ -> () |
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
open System | |
open MonoTouch.UIKit | |
open Cirrious.FluentLayouts.Touch | |
type PhotoViewController() = | |
inherit UIViewController() | |
let imageViewSize = 200.0f | |
let imageView = | |
let view = UIImageView( |
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
using System.Drawing; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
namespace HexagonApp { | |
[Register ("AppDelegate")] | |
class AppDelegate : UIApplicationDelegate { | |
UIWindow window; | |
public override bool FinishedLaunching (UIApplication app, NSDictionary options) { |
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
module MonkeyBot.Plugins.WhatsForLunch | |
open System | |
open DDay.iCal | |
open MonkeyBot | |
let ZeroCaterId = "..." | |
type LunchResponse = | |
| Lunch of string |
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
let trace format = flip Printf.ksprintf format <| fun line -> | |
if Environment.GetEnvironmentVariable "DEBUG" = "true" then | |
Console.WriteLine line |
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
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
using System.Text.RegularExpressions; | |
namespace Gibberish | |
{ | |
public static class LoremIpsum | |
{ | |
const string Corpus = @"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent ornare id erat a pellentesque. Integer tincidunt velit odio, molestie varius lorem volutpat at. Sed ultricies ligula orci, congue condimentum libero sollicitudin non. Morbi eget nisl facilisis, semper enim in, lacinia ligula. Etiam felis leo, malesuada non consequat ut, dignissim vitae arcu. Quisque a turpis sodales, dignissim nunc posuere, ornare risus. Nunc vitae ligula porttitor, consectetur odio ut, condimentum ipsum. |
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
using System; | |
namespace Foo | |
{ | |
class MainClass | |
{ | |
static void Go (Action<int> act) | |
{ | |
act (1); | |
} |