GithubHelp home page GithubHelp logo

Hello world

  • I'm currently working at Pulumi as a Software Engineer.
  • I'm available on twitter at @iwahbe or at linkedin at the same name.
Anything can be complicated. Let's make the simple things simple.

fn fizzbuzz(n: usize) {
    let factory = move |div_by: usize, then: Box<dyn Fn(usize)>, otherwise: Box<dyn Fn(usize)>| {
        move |k: usize| {
            if k % div_by == 0 {
                then(k)
            } else {
                otherwise(k)
            }
        }
    };
    macro_rules! box_me {
        ($e: expr) => {
            Box::new($e)
        };
    }
    let print_k = box_me!(|k| println!("{:?}", k));
    let buzz_yes = box_me!(factory(
        5,
        box_me!(|_| println!("fizzbuzz")),
        box_me!(|_| println!("fizz")),
    ));
    let buzz_no = box_me!(factory(5, Box::new(|_| println!("buzz")), print_k));
    let fizz = factory(3, buzz_yes, buzz_no);
    (1..n + 1).for_each(fizz)
}

Ian Wahbe's Projects

arcroutinglibrary icon arcroutinglibrary

A collection of problem abstractions and solver implementations for arc-routing problems

brew-rs icon brew-rs

Rust interface with the home-brew cli

cobra icon cobra

A Commander for modern Go CLI interactions

cs-221 icon cs-221

A repository of my work over the course of CS 221

diagon icon diagon

Interactive ASCII art diagram generators. :star2:

doomemacs icon doomemacs

An Emacs framework for the stubborn martian hacker

exhaustive icon exhaustive

Check exhaustiveness of switch statements of enum-like constants in Go source code.

fuser icon fuser

Filesystem in Userspace (FUSE) for Rust

gh-combine-prs icon gh-combine-prs

A `gh` extension for combining multiple PRs (e.g. Dependabot PRs) into one.

hotkey icon hotkey

Simple global shortcuts in macOS

ion-mode icon ion-mode

Emacs major mode for scripting with the ion-shell

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.