Skip to content

Instantly share code, notes, and snippets.

View pramoth's full-sized avatar

Pramoth Suwanpech pramoth

View GitHub Profile
<input type=”text” value=”Pramoth” class=”myclass” disabled>
<input type=”text” value=”Pramoth” class=”myclass”>
HTMLElement.attributes = {
type:{name:’type’, value:’text’ },
value:{name:’value’, value:’Pramoth’ },
class:{name:’class’, value:’myclass’ }
}
@pramoth
pramoth / jdk8_optional_monad_laws.java
Created August 27, 2016 05:38 — forked from ms-tg/jdk8_optional_monad_laws.java
Does JDK8's Optional class satisfy the Monad laws? Yes, it does.
/**
* ```
* Does JDK8's Optional class satisfy the Monad laws?
* =================================================
* 1. Left identity: true
* 2. Right identity: true
* 3. Associativity: true
*
* Yes, it does.
* ```