Skip to content

Instantly share code, notes, and snippets.

View xr1s's full-sized avatar
🤔
Just Nothing :: Maybe (Maybe a)

xris xr1s

🤔
Just Nothing :: Maybe (Maybe a)
View GitHub Profile
@xr1s
xr1s / chain.cc
Last active August 30, 2023 21:34
C++ Chain Range Adaptor
// https://xr1s.me/2023/08/13/cxx-user-defined-range-adaptor/
#include <fmt/core.h>
#include <algorithm>
#include <concepts>
#include <deque>
#include <forward_list>
#include <iterator>
#include <ranges>
@xr1s
xr1s / main.cc
Last active March 1, 2023 18:26
#include <stdio.h>
struct Basest {
virtual void foo() {
return this->bar();
}
virtual void bar() = 0;
};
from typing import List, Sequence, TypeVar, overload
T = TypeVar("T")
@overload
def de_bruijn(alphabet: str, n: int) -> str:
...