Skip to content

Instantly share code, notes, and snippets.

Lyndon Maydwell sordina

View GitHub Profile
View bucket_puzzle.hs
-- https://gist.github.com/sordina/ea8c66ddcc467f77b58b0af0b5628435
module Lib ( main ) where
import Data.Tree
import Data.List
import System.Environment
type Capacity = Int
type Level = Int
View gist:d3099ea5385bb22020064944ee9cefc4
# https://en.wikipedia.org/wiki/APL_syntax_and_symbols
# https://code.jsoftware.com/wiki/NuVoc
# https://news.ycombinator.com/item?id=8605606
#
#
# sub asterisk by multiply;
# Roll ?B
# Ceiling ⌈B >.
sub greater period by uni2308;
View numwords.hs
module Main where
main :: IO ()
main = interact (unlines . map (go . read) . lines)
go :: Int -> String
go n = case term n
of [] -> "nothing"
[(x,"")] -> numb x
xs -> unwords $ map item xs
View looksay.ex
defmodule Looksay do
def build([h|l]) do
n = l |> length |> Looksay.succ |> inspect
n <> h
end
def succ(x), do: x + 1
def group([],x), do: [ x ]
def group([h|t],[]), do: group(t,[h])
View recursionschemes.hs
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE DeriveFunctor #-}
module Main where
import Control.Arrow
import Data.Functor.Classes
data Fix f = In { out :: (f (Fix f)) }
View regexlogic.hs
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module Main where
import Data.String
import Data.Monoid hiding (Alt)
import Control.Applicative
import Control.Monad.Logic
View HaskellEqualityMatrix.hs
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
import Language.Haskell.Interpreter
import Text.InterpolatedString.Perl6
import Control.Exception
import Control.Monad
import Data.Traversable
format :: Either InterpreterError Bool -> String
View userconfig.dhalltypes
{ name : Text, ip : Text, pageLimit : Integer }
View states.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.