This file contains hidden or 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 FizzBuzzEnumerable; | |
using System.Collections; | |
using System.Collections.Generic; | |
class Program | |
{ | |
public class FizzBuzzEnumerable : IEnumerable<string> | |
{ | |
public IEnumerator<string> GetEnumerator() |
This file contains hidden or 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 | |
open System.Threading.Tasks | |
open Microsoft.AspNetCore.Builder | |
open Microsoft.Extensions.Hosting | |
open Microsoft.AspNetCore.Http | |
let getHandler (ctx : HttpContext) : Task = | |
let routePath = ctx.Request.RouteValues["path"] :?> string | |
let nonNullPath = if routePath = null then "" else routePath | |
ctx.Response.WriteAsync(sprintf "Hello %s" nonNullPath) |
This file contains hidden or 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 FizzBuzzWithoutNumbers; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
class Program | |
{ | |
public class EmptyStringEnumerable : IEnumerable<string> | |
{ |
This file contains hidden or 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 FizzBuzzCircular; | |
using System.Collections; | |
using System.Collections.Generic; | |
class Program | |
{ | |
public class Node | |
{ | |
private readonly Func<string> _fn; |
This file contains hidden or 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 Fizzbuzz; | |
using System.Collections; | |
using System.Collections.Generic; | |
class Program | |
{ | |
public class FizzBuzzEnumerable : IEnumerable<string> | |
{ | |
private readonly int n; |
This file contains hidden or 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 Fizzbuzz; | |
using System.Collections; | |
using System.Collections.Generic; | |
class Program | |
{ | |
public class FizzBuzzEnumerable : IEnumerable<string> | |
{ | |
public IEnumerator<string> GetEnumerator() |
This file contains hidden or 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
// Advent of Code 2024. Day 20: Race Condition. | |
// dotnet fsi aoc20.fsx | |
open System | |
open System.IO | |
open System.Collections.Generic | |
open System.Diagnostics | |
module Array2D = | |
let inBounds (a : 'a[,]) (x, y) = |
This file contains hidden or 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
// Advent of Code 2024. Day 19: Linen Layout. | |
// dotnet fsi aoc19.fsx | |
open System | |
open System.IO | |
open System.Collections.Concurrent | |
let trim (input : string) = input.Trim() | |
let split (splitter : string) (input : string) = input.Split(splitter) |
This file contains hidden or 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
// Advent of Code 2024. Day 18: RAM Run. | |
// dotnet fsi aoc18.fsx | |
open System | |
open System.IO | |
open System.Collections.Generic | |
type Pos = (int*int) | |
type PQ = PriorityQueue<Pos * int, int> |
This file contains hidden or 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
// Advent of Code 2024. Day 17: Chronospatial Computer. | |
// dotnet fsi aoc17.fsx | |
open System | |
open System.IO | |
type Computer = { | |
regA : int64 | |
regB : int64 | |
regC : int64 |
NewerOlder