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 { Node } from '@motion-canvas/2d/lib/components'; | |
import { all } from '@motion-canvas/core/lib/flow'; | |
import { | |
InterpolationFunction, | |
TimingFunction, | |
deepLerp, | |
easeInOutCubic, | |
} from '@motion-canvas/core/lib/tweening'; | |
import { Vector2 } from '@motion-canvas/core/lib/types'; |
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
export type Derivative = 0 | 1 | 2 | 3; | |
/** | |
* A polynomial in the form ax^3+bx^2+cx+d up to a cubic. | |
*/ | |
export class Polynomial { | |
public readonly c1: number; | |
public readonly c2: number; | |
public readonly c3: number; |
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 {computed, ref} from "vue"; | |
import { | |
addMonths, addYears, | |
eachDayOfInterval, | |
endOfISOWeek, | |
getYear, | |
getDate, | |
isSameMonth, | |
startOfISOWeek, | |
startOfMonth, |
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
<?php | |
interface Functor | |
{ | |
// fmap :: Functor f => (a -> b) -> f a -> f b | |
public function fmap(callable $fn): Functor; | |
} | |
class Fn implements Functor | |
{ |
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
-- Given a list of numbers, generate a list of all possible sums. | |
-- Solution | |
map sum $ filterM (const [True, False]) [1..5] | |
-- Manual evaluation of `filterM (const [True, False]) [1..5]` using repeated substitution | |
filterM (const [True, False]) [1..5] | |
-- replace `filterM` with its definition |
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
set nocompatible | |
filetype off | |
call plug#begin('~/.vim/plugged') | |
" Plugins | |
" ------------------------------ | |
Plug 'kien/ctrlp.vim' | |
Plug 'Raimondi/delimitMate' | |
Plug 'mattn/emmet-vim' |