This file contains hidden or 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
{-# LANGUAGE FlexibleContexts #-} | |
module Eval | |
( EvalError (..) | |
, eval | |
, letrec | |
) where | |
import Control.Monad.Catch (Exception) |
This file contains hidden or 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
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
module Instr where | |
import Prelude hiding (drop) | |
import Data.Map (Map) | |
import Data.String |
This file contains hidden or 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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
/* | |
* I need these functions. | |
*/ | |
public static class ListExt { | |
/* |
This file contains hidden or 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
https://github.com/ephtracy/voxel-model/blob/master/MagicaVoxel-file-format-vox-extension.txt |
This file contains hidden or 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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
/* | |
* I need these functions. | |
*/ | |
public static class ListExt { | |
/* |
This file contains hidden or 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
{-# OPTIONS_GHC -fglasgow-exts #-} | |
{-# Language LambdaCase #-} | |
{-# Language TypeApplications #-} | |
{-# Language ScopedTypeVariables #-} | |
{-# Language ExplicitForAll #-} | |
{-# Language AllowAmbiguousTypes #-} | |
{-# Language TypeFamilies #-} | |
{-# Language DataKinds #-} | |
{-# Language EmptyCase #-} |
This file contains hidden or 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
{-# language DeriveFunctor #-} | |
import Control.Applicative ((<|>)) | |
import qualified Data.Map as Map | |
import Data.Map (Map) | |
import Data.Maybe | |
newtype FrameStack k v = FrameStack |
This file contains hidden or 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
// Задача: написать односвязный иммутабельный список и несколько функций для него. | |
let List = { | |
// Пустой список. Поскольку он иммутабельный, хватит и одного на все списки. | |
// | |
empty: undefined, | |
// Присоединить элемент head к списку tail. |
This file contains hidden or 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
let R = require("./node_modules/ramda") | |
let treeUtils = require("./tree-utils") | |
let {inspect} = require("util") | |
show = x => inspect(x, {depth: null}) | |
log = console.log | |
/////////////////////////////////////////////////////////////////////////////// |
This file contains hidden or 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
/* | |
Array is too dumb. | |
*/ | |
class Subscribers { | |
constructor () { | |
this.counter = 0 | |
this.mapping = new Map() | |
} | |
add(sink) { |