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
( | |
cat << FOO | |
Some text here | |
Some more text | |
Yet some more text. | |
FOO | |
) > some_file |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
public sealed class Maybe<T> | |
{ | |
private readonly bool _hasValue; | |
private readonly T _value; |
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
/* <---- Add extra / on this line to uncomment first block and comment second block! | |
Function1(); | |
/*/ | |
Function2(); | |
//*/ | |
//* | |
Function1(); | |
/*/ | |
Function2(); |
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
trait AttributeName { self => | |
type AttributeType | |
def of(value : AttributeType) : Attribute = new Attribute { | |
type Name = self.type | |
val Value = value | |
} | |
} | |
trait Attribute { |
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
tree :: Tree Int | |
tree = Node 1 [ Node 2 [], Node 3 [] ] | |
test = zipper tree | |
& downward branches | |
& withins traverse | |
<&> downward root | |
<&> focus %~ (\x -> x + 10) | |
<&> rezip | |
-- Node {rootLabel = 1, subForest = [Node {rootLabel = 12, subForest = []},Node {rootLabel = 3, subForest = []}]} |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace us.lambdacalcul.collections | |
{ | |
public class PriorityDeque<T, P> | |
{ |
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
//SomeTraits.scala | |
trait Foo { | |
def someNumbers: List[Int] | |
def getNumbers : List[Int] = someNumbers | |
} | |
trait FilteredFoo extends Foo { | |
def numberFilter : Int => Boolean |
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 RankNTypes #-} | |
module AList where | |
import Control.Lens | |
type AList t = [(String, t)] | |
alistGet :: String -> AList t -> Maybe t | |
alistGet key ((k,v):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
import scala.annotation.{StaticAnnotation, compileTimeOnly} | |
import scala.language.experimental.macros | |
import scala.reflect.macros.whitebox | |
trait EnumishValue extends Ordered[EnumishValue] with java.lang.Comparable[EnumishValue] { | |
def id: Int | |
def compare(that: EnumishValue) = this.id - that.id | |
} | |
@compileTimeOnly("enable macro paradise to expand macro annotations") |
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
// ==UserScript== | |
// @name Remove Sponsored Facebook Elements | |
// @description Remove sponsored items from feed. | |
// @author Turing Eret | |
// @namespace us.lambdacalcul | |
// @version 0.1 | |
// @copyright Copyright © 2020 Turing Eret | |
// @license MIT | |
// @match https://*.facebook.com/* | |
// @grant none |
OlderNewer