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
#![feature(box_syntax)] | |
fn go(outer: impl Iterator<Item = impl Iterator<Item = usize>>) { | |
print!("[ "); | |
for inner in outer { | |
print!("["); | |
for x in inner { | |
print!(" {} ", x) | |
} |
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
// Create an HTTP client for consumption by oauth2 from the actix-web HTTP client. | |
// This is used when exchanging an authorization code for an access token. | |
use actix_web::client; | |
use oauth2::{HttpRequest, HttpResponse}; | |
use std::str::FromStr; | |
use ::http::header::HeaderName; | |
use ::http::{HeaderMap, HeaderValue, StatusCode}; |
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
/* Adapted from snabbdom/updateChildren - The MIT License - Simon Friis Vindum */ | |
import { api } from 'sinuous'; | |
export function map(items, expr) { | |
const { subscribe, root, cleanup } = api; | |
let parent = document.createDocumentFragment(); | |
const beforeNode = parent.appendChild(document.createTextNode('')); | |
const afterNode = parent.appendChild(document.createTextNode('')); |
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
{-# LANGUAGE DeriveFunctor #-} | |
module Main where | |
type Algebra f a = f a -> a | |
type Coalgebra f a = a -> f a | |
newtype Fix f = In { out :: f (Fix f) } |