Lisp has a very simple syntax:
(<function> ...)
A function in Lisp has the following form:
| // Trying to simulate do-notation in TypeScript using async/await | |
| // Trying to convert https://codewithstyle.info/advanced-functional-programming-typescript-monads-generators/ | |
| // to use async/await. Generators work but aren't type safe because of https://github.com/Microsoft/TypeScript/issues/2983 | |
| interface MyPromise<A> { | |
| then<B>(fn: (a: A) => Option<B>): MyPromise<B> | |
| } | |
| export class Option<A> implements MyPromise<A> { |
Error: 'tls: oversized record received with length 20527'
Trying to reach: 'https://172.17.0.3:9090/'
Remove the https: from the URL path. The link will become:
http://localhost:8001/api/v1/namespaces/kube-system/services/kubernetes-dashboard:/proxy/
| type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>> | |
| /* Source: https://github.com/Microsoft/TypeScript/pull/21316#issuecomment-364982638 */ | |
| type DiscriminateUnion<Union, TagKey extends keyof Union, TagValue extends Union[TagKey]> = | |
| Union extends Record<TagKey, TagValue> ? Union : never | |
| type MatchingFunc<A extends { kind: string }, K extends A['kind'], U> = (a: Omit<DiscriminateUnion<A, 'kind', K>, 'kind'>) => U | |
| function match<A extends { kind: string }>(discriminant: A) { |
| type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>> | |
| type DiscriminateUnion<Union, TagKey extends keyof Union, TagValue extends Union[TagKey]> = | |
| Union extends Record<TagKey, TagValue> ? Union : never | |
| type MatchingFunc<A extends { kind: string }, K extends A['kind'], U> = (a: Omit<DiscriminateUnion<A, 'kind', K>, 'kind'>) => U | |
| function match<A extends { kind: string }>(discriminant: A) { | |
| return <U>(obj: |
| class Maybe<A> { | |
| [Generic.repr]: Generic<MaybeRepr, A> | |
| } | |
| interface MaybeRepr extends Repr { | |
| type: Maybe<this[1]> | |
| } | |
| type test1 = Of<MaybeRepr, string> // Maybe<string> | |
| class Result<T, E> { | |
| [Generic.repr]: Generic<ResultRepr, T, E> |
| const UNSAFE_CHARS_REGEXP = /[<>\/\u2028\u2029]/g | |
| const ESCAPED_CHARS = { | |
| '<' : '\\u003C', | |
| '>' : '\\u003E', | |
| '/' : '\\u002F', | |
| '\u2028': '\\u2028', | |
| '\u2029': '\\u2029' | |
| } | |
| function escapeUnsafeChars(unsafeChar) { | |
| return ESCAPED_CHARS[unsafeChar] |
| Phoenix.set({ | |
| openAtLogin: true, | |
| }) | |
| Key.on('return', ['option'], () => { | |
| createTerminal() | |
| }) | |
| Key.on('y', ['option'], () => { | |
| Modal.build({ |