Skip to content

Instantly share code, notes, and snippets.

View stevewillcock's full-sized avatar

Stephen Willcock stevewillcock

View GitHub Profile
@stevewillcock
stevewillcock / main.rs
Created March 28, 2023 00:16 — forked from timClicks/main.rs
Axum Example
use axum::{response::Json, routing::get, Router};
use serde_json::{json, Value};
async fn greet() -> Json<Value> {
json!({ "msg": "Hello, world!" }).into()
}
#[tokio::main]
async fn main() {
tracing_subscriber::fmt()
@stevewillcock
stevewillcock / FSharpisms.scala
Created November 8, 2018 06:20
FSharp pipeline operator in Scala
implicit class FSharpisms[+A](val a : A) extends AnyVal {
def |> [B](f: A => B) = f(a)
}