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
struct Solution | |
res::Union{Int64, Nothing} | |
end | |
function ex_div(a, b)::Solution | |
if b == 0 | |
Solution(nothing) | |
else | |
Solution(Int64(a / b)) | |
end |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
p#title { | |
font-size: 50px; | |
} |
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
type SumFunctor<'T> = { | |
sumFn : 'T -> 'T -> 'T | |
diffFn : 'T -> 'T -> 'T | |
} | |
let createSumFunctor monoidOp negMonoidOp = | |
{ | |
sumFn = monoidOp | |
diffFn = negMonoidOp | |
} |
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
# set your user tokens as environment variables, such as ~/.secrets | |
# See the README for examples. | |
[color] | |
ui = true | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow bold |
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
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type any = interface{} | |
func main() { |
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
{ | |
// Place your settings in this file to overwrite the default settings | |
"editor.acceptSuggestionOnCommitCharacter": false, | |
"editor.fontSize": 20, | |
"editor.fontFamily": "Fira Code", | |
"editor.codeLens": false, | |
"editor.fontLigatures": true, | |
"workbench.editor.enablePreview": false, | |
"files.autoSave": "onFocusChange", | |
"window.restoreWindows": "all", |
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
for f in *.ml; do x=$(basename "$f" ".ml"); refmt "$f" > "$x.re"; rm "$f"; done |
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
type [<Pojo>] Props = | |
{ source: string } //other properties here | |
[<Import("default", "react-markdown")>] | |
type private ReactMarkdown (props) = inherit Component<Props, obj> (props) | |
//create using | |
let view _ _ = | |
let props = { source = "# This is a header\n\nAnd this is a paragraph" } | |
com<ReactMarkdown, _, _> props [] //props is Props |
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
module Ord(A) | |
abstract def cmp(a : A, b : A) | |
end | |
class IntOrd | |
include Ord(Int32) | |
def cmp(a, b) | |
a > b | |
end |
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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "cmd+1", | |
"command": "type", | |
"args": { | |
"text": "|>" | |
}, | |
"when": "editorTextFocus" | |
}, |
NewerOlder