Original articles by Mark Leair, PGI Compiler Engineer
This is Part 1 of a series of articles:
Original articles by Mark Leair, PGI Compiler Engineer
This is Part 1 of a series of articles:
#include <iostream> | |
#include "borrow_checker.hpp" | |
int main() | |
{ | |
auto i = 42; | |
// borrow `i` under name `ref` | |
borrow_var(ref, i) |
{-# LANGUAGE TypeSynonymInstances #-} | |
data Dual d = D Float d deriving Show | |
type Float' = Float | |
diff :: (Dual Float' -> Dual Float') -> Float -> Float' | |
diff f x = y' | |
where D y y' = f (D x 1) | |
class VectorSpace v where | |
zero :: v |