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
// Define the types for the inputs and outputs | |
type AccountID = AccountID of int | |
type Balance = Balance of decimal | |
type Deposit = Deposit of int * decimal | |
type NewBalance = NewBalance of decimal | |
type LogMessage = string | |
// Define mock implementations for the operations | |
let getAccountBalance (AccountID id) = | |
match id with |
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 { useRef, useState } from "react"; | |
import ReactDOM from "react-dom"; | |
import { createRoot } from 'react-dom/client' | |
import { Canvas, MeshProps, useFrame } from '@react-three/fiber' | |
import { Mesh } from "three"; | |
import React from "react"; | |
function Box(props) { | |
// This reference will give us direct access to the mesh | |
const mesh = useRef<Mesh>(null!) |
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 Lit | |
open System | |
open Fable.Core | |
open Fable.Core.JsInterop | |
open Fable.React | |
open Browser.Types | |
open Lit | |
/// <summary> |
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
module Fable.Elmish.Nile | |
open Elmish | |
open FSharp.Control | |
open FSharp.Control.Core | |
[<RequireQualifiedAccess>] | |
module Program = | |
/// Uses `stream` to transform a stream of messages dispatched from the view | |
/// and a stream of updates to a stream of messages dispatched to `update`. | |
/// `stream` is only called once. |
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
module Command.Serialization | |
open Command | |
open System | |
open Akkling | |
open Akkling.Persistence | |
open Akka.Cluster.Tools.PublishSubscribe | |
open Akka | |
open Akka.Cluster.Sharding | |
open Akkling.Cluster.Sharding |
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
module Example | |
open Fable.Core | |
open Fable.Core.JsInterop | |
open Msal | |
open Configuration | |
open Account | |
open System.Collections.Generic | |
module private Internal = |
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 Lit | |
open System | |
open Fable.Core | |
open Fable.Core.JsInterop | |
open Fable.React | |
open Browser.Types | |
open Lit | |
/// <summary> |
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
module GiraffeJWTAuthExample.App | |
open System | |
open System.IO | |
open Microsoft.AspNetCore.Builder | |
open Microsoft.AspNetCore.Cors.Infrastructure | |
open Microsoft.AspNetCore.Hosting | |
open Microsoft.AspNetCore.Http | |
open Microsoft.Extensions.Hosting | |
open Microsoft.Extensions.Logging |
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
open System.Collections.Generic | |
[<Struct; CustomComparison; CustomEquality>] | |
type MyVal = | |
val X : int | |
new(x) = { X = x } | |
override this.Equals other = | |
match other with | |
| :? MyVal as y -> this.Equals y |
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
// For more information see https://aka.ms/fsharp-console-apps | |
open PuppeteerSharp | |
open Newtonsoft.Json.Linq | |
let launchOptions = | |
LaunchOptions( | |
Headless = true, | |
Args = | |
[| |
NewerOlder