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 { useMultimethod, __ } from "../../src/utils/multimethod"; | |
describe("simple multimethod implementation", () => { | |
it("should throw exception when default method is not supplied and no dispatch matches", () => { | |
const input = { id: "a", value: "test" }; | |
const throwErrorMultimethod = useMultimethod((data: any) => [ | |
data.id, | |
]).method(["c"], (data) => data.value); | |
expect(() => throwErrorMultimethod(input)).toThrowError(); |
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
// scrape all minutekey kiosks in US (requires csv with a complete list of US zip codes) | |
#r @"System.Core" | |
#r @"System.Io" | |
#r @"..\packages\FSharp.Data.2.0.14\lib\net40\FSharp.Data.dll" | |
#r @"..\packages\FSharp.Collections.ParallelSeq.1.0\lib\net40\FSharp.Collections.ParallelSeq.dll" | |
open System.IO | |
open System.Net | |
open System.Collections.Specialized | |
open FSharp.Collections.ParallelSeq |