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
#include 'protheus.ch' | |
Class Endereco | |
Data CEP As Character | |
Data Estado As Character | |
Data Cidade As Character | |
Data Bairro As Character | |
Data TipoLogradouro As Character | |
Data Logradouro As Character |
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
open ReasonReact; | |
open String; | |
type error = {status: int}; | |
type action = | |
| ChangeEmail(string) | |
| ChangePassword(string) | |
| PressEnterOnEmail | |
| PressEnterOnPassword |
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
class Monad m where | |
(>>=) :: m a -> (a -> m b) -> m b | |
(>>) :: m a -> m b -> m b | |
return :: a -> m a |
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
def main(): | |
name = input("What is your name? ") | |
print("Welcome to Fantasy Land, " + name + "!") |
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
[1 + 1, 2 + 2, 3 + 3, 4 + 4] |
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
cond([a, b]) = ifElse | either | both | |
merge(__, { x: y }) = assoc(x, y) |
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
import { __, reject, contains, either } from 'ramda' | |
const words = [ | |
'oi', 'como', 'vai', 'você', 'seu', 'idiota' | |
] | |
const blacklist = [ | |
'idiota', 'babaca', 'fdp' | |
] |
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
Stmt = _ 'function'i _ name:Name _ '(' ')' _ EOL _ body:Stmt+ _ { | |
return 'var name ' + name + ' = function () {' + body + '}' | |
} / _ 'return' _ e:Expression _ { | |
return 'return ' + e | |
} | |
Expression | |
= head:Term tail:(_ ("+" / "-") _ Term)* { | |
return tail.reduce(function(result, element) { | |
if (element[1] === "+") { return result + element[3]; } |
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
const _effect = evaluator => ({ type: 'effect', evaluator }); | |
const _mut = evaluator => ({ type: 'mut', evaluator }); | |
const _while = (condition, body) => env => { | |
if (condition(env)) { | |
const state = body.reduce((env, elem) => { | |
if (elem.type === 'effect') { | |
void elem.evaluator(env); | |
return env; | |
} else if (elem.type === 'mut') { |
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
#include <stdio.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
#include <termios.h> | |
#include <unistd.h> | |
#include <ctype.h> | |
#include <string.h> | |
#define FG_MAGENTA "\x1B[35m" | |
#define FG_RESET "\x1B[0m" |