Here's an ADT which is not a GADT, in Haskell:
data Expr = IntExpr Int | BoolExpr Bool
def using[C, T](resource: C)(handle: C => T)(implicit env: C => ({def close(): Unit})): T = { | |
try { | |
handle(resource) | |
} finally { | |
resource.close() | |
} | |
} |
# _plugins/url_decode.rb | |
require 'liquid' | |
require 'uri' | |
module URLDecode | |
def url_decode(url) | |
return URI.decode(url) | |
end | |
end |
<application> | |
<component name="RainbowSettings"> | |
<option name="rainbowifyHTMLInsideJS" value="true" /> | |
<option name="version" value="5.1" /> | |
<option name="lightRoundBracketsColors"> | |
<array> | |
<option value="0x263238" /> | |
<option value="0x455a64" /> | |
<option value="0x607d8b" /> | |
<option value="0x90a4ae" /> |
import java.util.Optional; | |
import java.util.function.Function; | |
public class Option { | |
public static <T, V> Optional<V> ofThrowable(T it, Function<T, V> func) { | |
try { | |
return Optional.ofNullable(func.apply(it)); | |
} catch (Exception e) { | |
return Optional.empty(); | |
} |
export class Lazy<T> { | |
private instance: T | undefined = undefined; | |
private readonly initializer: () => T; | |
constructor(initializer: () => T) { | |
this.initializer = initializer; | |
} | |
public get value(): T { | |
if (this.instance === undefined) { |
See also List of materials about Software Design in Haskell
Junior | Middle | Senior | Architect | |
---|---|---|---|---|
Haskell level | Basic Haskell | Intermediate Haskell | Advanced Haskell | Language-agnostic |
Haskell knowledge scope | Learn you a Haskell | Get programming with Haskell | Haskell in Depth | Knows several languages from different categories |
Get programming with Haskell | Haskell in Depth | Functional Design and Architecture | ||
[Other books on Software Architecture in Haskell](https://github.com/graninas/software-design-in-haskell#Books-on-S |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
Non-removable MDM profiles cannot officially removed without doing a full system wipe. This is a problem when you restore a system from Time Machine after you enrolled it into the MDM, as the MDM will break, leaving you unable to re-enroll the machine.
Here's how to remove a non-removable MDM profile Boot the Mac into Recovery Mode (hold down command+R during startup). Go to the Utilities menu and open Terminal and type: csrutil disable. This will disable SIP (System Integrity Protection). Reboot into the OS. Open the integrated terminal and type: