Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block swlaschin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
swlaschin / WorkflowTemplate.fsx
Created May 13, 2019
Workflow Template example
View WorkflowTemplate.fsx
#load "Result.fs"
// ==================================
// Example of workflows with Onion architecture
// ==================================
let notImplemented() = failwith "not implemented"
// ==================================
// pure workflow
swlaschin / testutils.fs
Last active Apr 29, 2019
Test utilities
View testutils.fs
module TestUtils
// Utilities for tests
/// Helper for testing only! Do not use in production!
let getOk result =
match result with
| Ok v -> v
| Error _ -> failwith "Error not expected"
View AsyncExample.fs
namespace AsyncExample
// requires Result.fs from
open System
open System.Net
module SimpleAsyncExample =
let makeAsync name = async {
printfn "Started %s" name
swlaschin /
Last active Apr 26, 2019
Effective F#, tips and tricks


  • Use Onion architecture

    • Dependencies go inwards. That is, the Core domain doesn't know about outside layers
  • Use pipeline model to implement workflows/use-cases/stories

    • Business logic makes decisions
    • IO does storage with minimal logic
    • Keep Business logic and IO separate
    • Keep IO at edges
swlaschin /
Created Jul 5, 2017
Functional Track talks from NDC Oslo 2017

Functional Track talks from NDC Oslo 2017

Also, here is the list of all videos from NDC Oslo 2017:

Wednesday 2017-06-14

swlaschin /
Last active Jul 10, 2017
Functional Track talks from NDC London 2017

Functional Track talks from NDC London 2017

Also, here is the list of all videos from NDC London 2017:

Wednesday 2017-01-18

swlaschin / 1-checkers-scratch-design.fsx
Last active Aug 14, 2018
Example of Domain Driven Design for the game of checkers. There are two files: a scratch file with a series of designs, and a final version.
View 1-checkers-scratch-design.fsx
Example of domain-driven design for Checkers
Rules from here:
// As we go through the rules, and learn things, we create a series of designs
module Version1 =
View CsvProvider.fsx
#r "packages/FSharp.Data/lib/net40/FSharp.Data.dll"
open FSharp.Data
type OzoneFile = CsvProvider<"">
let csv = new OzoneFile()
//What are the column names of the dataset?
You can’t perform that action at this time.