λ-Calculus, Church Encodings and Combinators [🌱]
Caution
NEED A INTRO TO LAMBDA CALC.
First, lets define "calculus"
Caution
NEED A INTRO TO LAMBDA CALC.
First, lets define "calculus"
https://doc.rust-lang.org/rust-by-example/primitives.html
Scalar Values | ||
---|---|---|
Signed Integers | i8 , i16 , i32 , i64 , i128 and isize (architecture pointer size) |
let x: i32 = -42; |
Unsigned Integers | u8 , u16 , u32 , u64 , u128 and usize (architecture pointer size) |
let x: u32 = 42; |
Fixed length array of bytes, called a "byte array" in other languages. ArrayBuffers have no type assigned to them. They are simply chunks of memory (in bytes). They also cannot be altered directly. A View or TypedArray needs to be created first.
const buffer = new ArrayBuffer(3);
For each bit, if both are 1
, the resulting bit is 1
. If either or both are 0
, the resulting bit is 0
.
Given the following two values:
element of
.
$3~{\in}~A$
type fetchOptions = { | |
timeout?: number, | |
retries?: number, | |
cancelable?: boolean, | |
method?: string, | |
mode?: RequestMode, | |
cache?: RequestCache, | |
credentials?: RequestCredentials, | |
headers?: HeadersInit, | |
redirect?: RequestRedirect, |
I'm not going to go too far into the setup as it is not much different from any other normal Jest setup. And they have plenty of documentation covering it already. In the component test files themselves, you will need to make sure you import vue-test-utils
and its probably a good idea to set some clean up in the beforeEach
handler.
import { shallowMount } from '@vue/test-utils';
import Component from './index.jsx';
describe('Component', () => {
beforeEach(() => {
jest.resetModules();
Functional programming (often abbreviated FP) is the process of building software by composing pure functions, avoiding shared state, mutable data, and side-effects. Functional programming is declarative rather than imperative, and application state flows through pure functions. Contrast with object oriented programming, where application state is usually shared and colocated with methods in objects.
Functional code tends to be more concise, more predictable, and easier to test than imperative or object oriented code — but if you're unfamiliar with it and the common patterns associated with it, functional code can also seem a lot more dense, and the related literature can be impenetrable to newcomers.
If you start googling functional programming terms, you're going to quickly hit a brick wall of academic lingo that can be very intimidating for beginners.
**Don't let all the
const isString = value => typeof value === 'string' || value instanceof String; | |
/* | |
camelCase('camel case'); // camelCase | |
camelCase('camel_case'); // camelCase | |
camelCase('camel-case'); // camelCase | |
*/ | |
const camelCase = str => { | |
if(!isString(str)) { | |
return ''; |