The following debugging information was generated by Atom Beautify
on Mon Jun 11 2018 16:49:15 GMT+0300 (MSK)
.
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
maze :: Integer -> Integer -> Integer | |
maze x y | |
| abs x > 10 || abs y > 10 = 0 | |
| x == 0 && y == 0 = 2 | |
| abs x == 9 && abs y == 9 = 1 | |
| abs x == 10 || abs y == 10 = 1 | |
| x == y = 3 | |
| abs x == abs y = 4 | |
| x < 0 && x > (-9) && y == 0 = 4 | |
| x > 0 && x < 9 && y == 0 = 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
object Poly { | |
val show: Any => String = { | |
case x: Int => s"Int($x)" | |
case x: Long => s"Long($x)" | |
case x: String => s"String($x)" | |
case _ => ??? | |
} | |
def show1(x: Int): String = s"Int($x)" | |
def show1(x: Long): String = s"Long($x)" |
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
first : (a -> b) -> (a, c) -> (b, c) | |
first f (x, y) = (f x, y) | |
interface BooleanFunction a where | |
makeTable : a -> List (List Bool, Bool) | |
BooleanFunction Bool where | |
makeTable result = [([], result)] | |
BooleanFunction a => BooleanFunction (Bool -> a) where |
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 Control.Monad (foldM_) | |
import Data.List (foldl') | |
import System.IO | |
import qualified System.Random as R | |
data Treap = | |
Node (Int, Int) Treap Treap | | |
Null | |
instance Show Treap where |
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 EvenOdd | |
import Data.Fin | |
%access public export | |
%default total | |
data Even : (n: Nat) -> Type where | |
ZEven : Even Z | |
SsEven : (n: Nat) -> Even n -> Even (S (S n)) |
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 Existential | |
%access public export | |
StackInterface : Type -> Type | |
StackInterface a = ( a | |
, Integer -> a -> a | |
, a -> (a, Integer) | |
) |
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
-- | Stores information for printing expressions in their original form. | |
data FormattedExprExt | |
type instance XExprProcCall FormattedExprExt _ _ = NoExt | |
type instance XExprLit FormattedExprExt _ _ = Selection | |
-- | Space between the brackets and nested expression. | |
type instance XXExpr FormattedExprExt cmd components = | |
ExprInBrackets FormattedBracket (Expr FormattedExprExt cmd components) | |
-- | Information about the space between procedure and its arguments and between |
- Красивая поддержка случая
fromElement > toElement
вsubSet
- Красивая с точки зрения ООП реализация
NavigableSet
- Поддержка
protected
интерфейсов (или классов) в задании Implementor
HW | Deadline | Hard Deadline |
---|---|---|
1 | 14.02.2018 | |
2 | 22.02.2018 | 22.03.2018 |
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
/** | |
* Returns a new stream that contains items that has been received by sequentially combining items of the streams into pairs | |
* and then applying given function to each pair of items. | |
* | |
* @param with a {@link Stream} to zip current stream with. | |
* @param func a function that takes an item of the current stream and an item of another stream | |
* and returns a corresponding value for the new stream. | |
* @param <S> a type of a stream to zip current stream with. | |
* @param <R> a type of items new stream returns. | |
* @return a new stream that contains items that has been received by sequentially combining items of the streams into pairs |