Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Code examples from
(* ===================================
Code from my series of posts "Six approaches to dependency injection"
=================================== *)
open System
(* ======================================================================
1. Dependency Retention
In which we don't worry about managing dependencies,
and just inline and hard-code everything!
====================================================================== *)
let compareTwoStrings() =
printfn "Enter the first value"
let str1 = Console.ReadLine()
printfn "Enter the second value"
let str2 = Console.ReadLine()
if str1 > str2 then
printfn "The first value is bigger"
else if str1 < str2 then
printfn "The first value is smaller"
printfn "The values are equal"
// The only way to test this is manually
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment