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
var listSelectors = require('list-selectors'); | |
var fs = require('fs') | |
module.exports = function(elmsource) { | |
function makeLine(prefixedName) { | |
const name = prefixedName.substr(1) | |
return `${name} = "${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
%default total | |
p_implies_p : p -> p | |
p_implies_p x = x | |
data And a b = MkAnd a b | |
data Or a b = Left a | Right b | |
p_implies_p_and_p : p -> And p p |
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 <stdlib.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <time.h> | |
uint64_t water_on_pillars(uint64_t pillars[], size_t len) { | |
if (len < 3) { | |
return 0; | |
} |
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
typeSignature = | |
lazy <| \() -> | |
sepBy (whitespace *> string "->" *> whitespace) nonFunctionType | |
|> andThen ( | |
reducer TArrow | |
>> Maybe.map succeed | |
>> Maybe.withDefault (fail "expected type, got nothing") | |
) | |
reducer : (a -> a -> a) -> List a -> Maybe 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
typeSignature = | |
lazy <| \() -> | |
sepBy (whitespace *> string "->" *> whitespace) nonFunctionType | |
|> andThen ( | |
reducer TArrow | |
>> Maybe.map succeed | |
>> Maybe.withDefault (fail "expected type, got nothing") | |
) | |
reducer : (a -> a -> a) -> List a -> Maybe 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
typeSignature = | |
lazy <| \() -> | |
sepBy (whitespace *> string "->" *> whitespace) nonFunctionType | |
|> andThen ( | |
reducer TArrow | |
>> Maybe.map succeed | |
>> Maybe.withDefault (fail "expected type, got nothing") | |
) | |
reducer : (a -> a -> a) -> List a -> Maybe 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
module ParseLibrary exposing (typeSignature) | |
import Combine exposing (..) | |
import Dict exposing (Dict) | |
type Type | |
= TArrow Type Type | |
| TName String | |
| TRecord (Dict String Type) |
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 <iostream> | |
#include <list> | |
#include <algorithm> | |
using namespace std; | |
int n; | |
int *aita; | |
void print_solution(int tertiary){ |
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 Child exposing (init, update, Message(InterestingMessage)) | |
init = 0 | |
type Message | |
= InterestingMessage | |
| InternalMessage | |
update message model = model |
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 Child exposing (init, update, Message(InterestingMessage)) | |
init = 0 | |
type Message | |
= InterestingMessage | |
| InternalMessage | |
update message model = model |
NewerOlder