Skip to content

Instantly share code, notes, and snippets.

View zelinskiy's full-sized avatar

Nikita M. Yurchenko zelinskiy

View GitHub Profile
newtype Cont r a = Cont { runCont :: (a -> r) -> r }
instance Functor (Cont c) where
fmap f (Cont c) = Cont $ \k -> c (\x -> k (f x))
instance Applicative (Cont c) where
Cont cf <*> Cont cx = Cont $ \k -> cf (\fn -> cx (\x -> k (fn x)))
pure x = Cont $ \k -> k x
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE TypeOperators #-}
data Eql a b where
Refl :: Eql a a
--Нужно для протаскивания Рефла
using Microsoft.Bot.Builder.Dialogs;
using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Bot.Connector;
namespace Kirill.Supports
{
public class RequestMaker:LuisDialog<object>
{
module Axioms where
import Prelude (const, undefined)
newtype Void = Void Void
data Prod a b = Prod a b
data Sum a b = A1 a | A2 b
a1 :: a -> (b -> a)
a1 a b = a
-- Date: April 2012
-- Author: Jan Malakhovski
-- For TTFV: http://oxij.org/activity/ttfv/
-- Everything here is in Public Domain.
module PrimitiveAgda where
-- ≡ is \==
-- Martin-Lof equivalence on values.
module lol where
open import Level
open import Relation.Binary.Core
--------------BOOL---------------------------------------
data 𝔹 : Set where
tt : 𝔹
ff : 𝔹
(set-language-environment "UTF-8")
(set-default-coding-systems 'utf-8)
(eval-after-load "quail/latin-ltx"
'(mapc (lambda (pair)
(quail-defrule (car pair) (cadr pair) "TeX"))
'( ("\\bb" "𝔹") ("\\bl" "𝕃") ("\\bs" "𝕊")
("\\nn" "¬")
("\\bt" "𝕋") ("\\bv" "𝕍") ("\\cv" " O ")
("\\comp" "∘") ("\\m" "⟼") ("\\om" "ω"))))
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VkNet;
using VkNet.Enums.Filters;
using VkNet.Model.RequestParams;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms.DataVisualization.Charting;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
module Match where
import Data.List
data Direction = Horiz | Vert deriving (Eq, Show)
data LinePointType = Begin | End deriving (Eq, Show)
data LinePoint = LinePoint LinePointType Direction (Int, Int) deriving (Eq)
data Line = Line LinePoint LinePoint deriving (Eq)
instance Show LinePoint where