Skip to content

Instantly share code, notes, and snippets.

View edgarfgp's full-sized avatar
🏡
F# Swift C#

Edgar Gonzalez edgarfgp

🏡
F# Swift C#
View GitHub Profile
@edgarfgp
edgarfgp / ap-pattern.fs
Created July 28, 2022 09:43
Active Patterns. with Pattern matching
let (|IsOneOf|_|) x y = if x = y then Some() else None
type SomeRecord =
{ ExternalEnum: int
SomeStringData: string }
let toProcess =
[ { ExternalEnum = 1
SomeStringData = "I contain xml" }
{ ExternalEnum = 2
@edgarfgp
edgarfgp / script.fsx
Last active July 29, 2021 17:05
FSharp Reactive http calls
open System.Reactive.Disposables
#r "nuget: Ply"
#r "nuget: System.Text.Json, 5.0.2"
#r "nuget: FSharp.SystemTextJson, 0.17.4"
#r "nuget: Fsharp.Control.Reactive, 5.0.2"
open FSharp.Control.Reactive
open FSharp.Control.Tasks
namespace DynamicUI
open DynamicUI.Models
open FSharp.Data
open FSharp.Json
module NetworkService =
let getMusicDataSearch (searchText: string option) =
async {
namespace DynamicUI
open DynamicUI
open DynamicUI.Models
open Fabulous
open Fabulous.XamarinForms
open Xamarin.Forms
module Extensions =
let rec filterMusic predicate musicList =
namespace DynamicUI
open Fabulous.XamarinForms.LiveUpdate
open Fabulous
open Fabulous.XamarinForms
open Models
open Xamarin.Forms
module App =