Skip to content

Instantly share code, notes, and snippets.

View mfonism's full-sized avatar

Mfon Eti-mfon mfonism

View GitHub Profile
@mfonism
mfonism / 2024.04.21--filter-like-a-real-star.md
Last active April 21, 2024 19:02
Elm Homework for Friends at Hamelin

PREV: Map it like it's hot!
NEXT:


Filter like a Real star!

Filtering is a powerful feature in functional programming that allows you to refine and manipulate datasets efficiently, ensuring that only elements meeting specific criteria are retained for further processing.

@mfonism
mfonism / 2024.04.12--map-it-like-its-hot.md
Last active April 21, 2024 15:17
Elm Homework for Friends at Hamelin

PREV: Types and Values Ninjery!
NEXT: Filter like a real star


Map it like it's hot!

This batch of exercises is designed to enhance your understanding of mapping in Elm. Mapping is a fundamental concept in functional programming that allows you to transform lists by applying a function to each element in the list. These exercises will provide you with practical scenarios to apply this concept, reinforcing your ability to manipulate and process data efficiently in Elm.

@mfonism
mfonism / 2024.02.11--types-and-values-ninjery.md
Last active April 12, 2024 18:53
Elm Homework for Friends at Hamelin
@mfonism
mfonism / 2024.01.24--conditionals-ninjery.md
Last active February 11, 2024 00:34
Elm Homework for Friends at Hamelin

PREV: Type Ninjery
NEXT: Types and Values Ninjery


Conditionals Ninjery!

A series of exercises with unique tasks for playing around with the basic Elm types we've come across so far, and getting more familiar with conditional logic.

Implementation Guidelines

@mfonism
mfonism / 2024.01.16--type-ninjery.md
Last active January 23, 2024 22:33
Elm Homework for Friends at Hamelin

NEXT: Conditionals Ninjery


🌟 Elm Type Challenge! 🌟

Hey Team,

To sharpen our understanding of Elm's type system, I've prepared some (hopefully) intriguing exercises. I encourage you to refrain from using your REPL or any other tools for evaluation. The real value lies in manually working through these problems and enhancing your intuitive grasp of Elm's types as you do so.

@mfonism
mfonism / karlverter.elm
Created November 5, 2023 15:54
Temperature converter (ELM)
module Main exposing (main)
import Browser
import Html exposing (Html, div, h1, input, label, text)
import Html.Attributes exposing (value)
import Html.Events exposing (onInput)
main : Program () Model Msg
main =
@mfonism
mfonism / Main.elm
Last active January 18, 2024 07:07
Basic skeleton of an Elm sandbox application
module Main exposing (main)
import Browser
import Html exposing (Html, text)
main : Program () Model Msg
main =
Browser.sandbox
{ init = myInit
@mfonism
mfonism / wecollections.md
Created October 12, 2023 12:28
WECOLLECTIONS by Kiwi

On those confusingly named things in net/http

http.Handle vs http.Handler vs Http.HandlerFunc

net/http gives us a function http.Handle, for attaching handlers to paths.

A handler is anything that satisfies the http.Handler interface, which is defined this way (I'm refusing to Google sh!t up, so I'm probably going to get the syntax wrong, and I crave your forgiveness for that):

interface Handler {
@mfonism
mfonism / countries.json
Created October 9, 2023 21:46 — forked from amitjambusaria/countries.json
Countries JSON with region, flag, currency and capital
[
{
"name": "Afghanistan",
"code": "AF",
"capital": "Kabul",
"region": "AS",
"currency": {
"code": "AFN",
"name": "Afghan afghani",
"symbol": "؋"
@mfonism
mfonism / clock.elm
Created October 27, 2022 22:16
Create a Clock with Elm after working through the tutorial at https://guide.elm-lang.org/effects/time.html
module Main exposing (..)
import Browser
import Html exposing (..)
import Html.Events exposing (onClick)
import Task
import Time
main =