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
// related to blog post: | |
// The first General Journal attempt | |
// Using F# to model Financial Accounting | |
// https://crazyivan.blog/the-first-general-journal-attempt | |
open System | |
type Transaction = exn | |
type AccountData = { AccountName : string } |
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
// related to blog post: | |
// Starting from ZERO | |
// Using F# to model Financial Accounting | |
// https://crazyivan.blog/starting-from-zero | |
open System | |
type Transaction = exn | |
type AccountData = { AccountName : string } |
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
namespace UI.FLib | |
module Loop = | |
// Loop that keeps running forever until an exception happens | |
let rec loop () = async { | |
do! Async.Sleep(5000) | |
printfn "Working" | |
return! loop () } |
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
#if INTERACTIVE | |
#r @"C:\Users\netaz\.nuget\packages\canopy\2.1.5\lib\netstandard2.0\canopy.dll" | |
#r @"C:\Users\netaz\.nuget\packages\selenium.webdriver\3.141.0\lib\netstandard2.0\WebDriver.dll" | |
#r @"C:\Users\netaz\.nuget\packages\newtonsoft.json\12.0.3\lib\netstandard2.0\Newtonsoft.Json.dll" | |
#r @"D:\OneDrive\T\canopy.experiment\bin\Debug\netcoreapp3.1\runtimes\win\lib\netcoreapp3.0\System.Drawing.Common.dll" | |
#endif | |
open System | |
open canopy.classic | |
open canopy.runner.classic |
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
// Based on this blog post: https://medium.com/@iquardt/taming-the-dom-50c8f1a6e892 | |
/* RULES | |
* Only the program may manipulate the output display, never the user | |
* User input is presented in the form of events | |
* GUI elements generate events only in response to user input, never in response to program output | |
*/ |
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
//Very basic F# command line UI | |
//trying to get a global state | |
open System | |
let mutable x = "NoUser" | |
let printPrompt () = | |
printfn "Current State: %s" x | |
printf "command:>" |