- nix installed
- "nix flake experimental feature" enabled
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
-- post-composition | |
foldl_foldr f z l = foldr (.>) id (foldr (\x -> (flip f x :)) [] l) z | |
-- f x .> (f y .> (f z .> id)) rs = f z (f y (f x rs)) -- .> quite not lazy | |
-- pre-composition = mieux que remplacement des ctors | |
foldr_foldr f z l = foldr (.) id (foldr (\x -> (f x :)) [] l) z |
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
#!/usr/bin/env stack | |
-- stack --resolver lts-17.10 script | |
-- or | |
-- stack --install-ghc --resolver lts-17.10 runghc --package base-unicode-symbols | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE UnicodeSyntax #-} |
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
#! /usr/bin/env nix-shell | |
#! nix-shell -i runghc -p "haskellPackages.ghcWithPackages(p: with p; [])" | |
#! nix-shell -I nixpkgs=channel:nixos-20.9 | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE ExistentialQuantification #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE RankNTypes #-} |
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
#!/usr/bin/env stack | |
-- stack --resolver lts-17.10 script | |
(.>) :: (a -> b) -> (b -> c) -> (a -> c) | |
f .> g = g . f | |
-- Convolution from "There and back again" Danvy GoldBerg -- https://www.brics.dk/RS/01/39/BRICS-RS-01-39.pdf | |
convWalk xs ys = walk xs (\_ b -> b) | |
where |
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
dotspacemacs-themes '(zenburn zen-and-art white-sand underwater ujelly twilight twilight-bright twilight-anti-bright toxi tao tao-yang tao-yin tangotango tango-plus tango-2 sunny-day brin dorsey fogus graham granger hickey junio mccarthy odersky ritchie spolsky wilson subatomic256 subatomic spacegray soothe solarized-dark solarized-light solarized soft-stone soft-morning soft-charcoal smyx seti reverse rebecca railscasts purple-haze professional planet phoenix-dark-pink phoenix-dark-mono organic-green omtose-darker omtose-softer oldlace occidental obsidian noctilux naquadah mustang monokai monochrome-bright monochrome molokai moe-dark moe-light moe minimal-light minimal material-light material majapahit-dark majapahit-light madhat2r lush light-soap kaolin-aurora kaolin-breeze kaolin-bubblegum kaolin-dark kaolin-eclipse kaolin-fusion kaolin-galaxy kaolin-light kaolin-mono-dark kaolin-ocean kaolin-valley-dark kaolin-valley-light jbeans jazz ir-black inkpot heroku hemisu-dark hemisu-light hemisu hc-zenburn g |
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
#! /usr/bin/env nix-shell | |
#! nix-shell -i "emacs --script" -p "pkgs.emacsWithPackages(epkgs: (with epkgs.melpaPackages; [ ox-gfm ]))" | |
#! nix-shell -I nixpkgs=channel:nixos-18.09 | |
(package-initialize) | |
(require 'org) | |
(require 'ox-gfm) | |
(org-gfm-publish-to-gfm nil "myorgfile.org" ".") |
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
#! /usr/bin/env nix-shell | |
#! nix-shell -i "emacs --script" -p "pkgs.emacsWithPackages(epkgs: (with epkgs.melpaPackages; [ dash ]))" | |
#! nix-shell -I nixpkgs=channel:nixos-18.03 | |
(package-initialize) | |
(require 'dash) | |
(message "Hi") |
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
#!/usr/local/bin/emacs --script | |
(package-initialize) | |
(require 'dash) |
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
data Tree = Leaf Int | |
| Node Tree Tree deriving Show | |
repmin t = tr | |
where (mn, tr) = walk mn t | |
NewerOlder