This file contains hidden or 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
| -module(bag). | |
| -export([new/0, from_list/1, flatten/1, insert/2, insert_many/3, remove/2, remove_many/3, remove_all/2, union/2, difference/2, contains/2, height/1, height_info/1, left/1, right/1]). | |
| % -compile(export_all). | |
| -type bag() :: nil | {any(), integer(), bag(), bag()}. | |
| -spec new() -> bag(). | |
| new() -> nil. |
This file contains hidden or 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
| import java.util.ArrayList; | |
| import java.util.Collection; | |
| import java.util.Collections; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Map.Entry; | |
| import java.util.Optional; | |
| import java.util.PriorityQueue; | |
| import java.util.function.Function; | |
| import java.util.function.Predicate; |
This file contains hidden or 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
| import java.io.BufferedReader; | |
| import java.io.FileReader; | |
| import java.io.IOException; | |
| import java.io.UnsupportedEncodingException; | |
| import java.util.Collection; | |
| import java.util.Collections; | |
| import java.util.Stack; | |
| import java.util.TreeMap; | |
| import java.util.TreeSet; | |
| import java.util.concurrent.atomic.AtomicReference; |
This file contains hidden or 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
| import java.security.SecureRandom; | |
| import java.time.LocalTime; | |
| import java.util.Random; | |
| import java.util.function.BinaryOperator; | |
| import java.util.logging.Logger; | |
| import static java.lang.StrictMath.abs; | |
| import static java.lang.StrictMath.pow; | |
| import static java.time.LocalTime.now; |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "regexp" | |
| "strings" | |
| "time" | |
| ) |
This file contains hidden or 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 #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| module GraphSearching where | |
| import Control.Applicative ((<|>)) | |
| import Control.Monad (join) | |
| import Data.List (sortOn) | |
| import Data.Maybe (isJust) |
This file contains hidden or 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
| module WriterMonad | |
| ( logInput | |
| ) where | |
| import Control.Monad.Writer | |
| import Data.Char (isDigit, isLetter, isLower, | |
| isPunctuation, isSpace, isUpper) | |
| logInput :: String -> [String] | |
| logInput xs = |
This file contains hidden or 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
| let g:hoogled_signatures = {} | |
| let g:hoogle_blacklist = [ | |
| \ 'where', | |
| \ 'let', | |
| \ 'class', | |
| \ 'then', | |
| \ 'module', | |
| \ 'qualified', | |
| \ 'data', | |
| \ 'type', |
This file contains hidden or 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
| " NOTE: requires +timers | |
| " cache storage | |
| let g:hoogled_completions = {} | |
| " non-function keywords | |
| let g:hoogle_blacklist = [ | |
| \ 'where', | |
| \ 'let', |
This file contains hidden or 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
| module Csv where | |
| import Data.List (lines) | |
| type Row = [String] | |
| type Lines = [String] | |
| type Table = [Row] |