Let's say you have implemented a small data pipeline library to replace LINQ.
module TrivialStream =
type Receiver<'T> = 'T -> unit
type Stream<'T> = Receiver<'T> -> unit
module Details =
namespace GhFsharpTest | |
open Grasshopper.Kernel | |
open Grasshopper.Kernel.Types | |
type Priority() = | |
inherit GH_AssemblyPriority() | |
override u.PriorityLoad() = | |
GH_LoadingInstruction.Proceed |
// You need to add missing types manually to IExport in Three.fs if you need. | |
// https://twitter.com/OnurGumusDev/status/1548282140806115330 | |
module rec Dat | |
open Browser.Types | |
open Fable.Core | |
open System |
open SharedMemory | |
open MBrace.FsPickler | |
module Rpc = | |
type RpcContext<'command, 'message> = | |
{ name: string; buffer: RpcBuffer; post: 'command -> Async<'message>} with | |
interface IDisposable with | |
member this.Dispose() = this.buffer.Dispose() | |
let createHost name (handler : 'command -> Async<'message>) = |
(* | |
An immutable R-Tree implementation in F#. | |
Based on: https://github.com/swimos/swim-rust/tree/main/swim_utilities/swim_rtree (licensed on Apache 2.0) | |
Author: Bartosz Sypytkowski <b.sypytkowski at gmail.com> | |
*) | |
namespace Demos.RTree |
This is an example on how to use WPF and F# to do some simple physics using Verlet Integration.
The program creates a system of particles and constraints. Particles have inertia and is affected by gravity but their motion is also contrained by the constraints.
I tried to annotate the source code to help guide a developer familiar with languages like C#. If you have suggestions for how to improve it please leave a comment below.