Skip to content

Instantly share code, notes, and snippets.

View noahhaasis's full-sized avatar
🍷
work :: Term -> Term

Noah Haasis noahhaasis

🍷
work :: Term -> Term
  • Nuremberg, Germany
View GitHub Profile
def combinations(half, options):
res = [""]
for i in range(half):
new_result = []
for s in res:
for o in options:
new_result.append(o+s)
res = new_result
return res
const z = f => x => x
const succ = n => f => x => f(n(f)(x))
function encode_numeral(n) {
if (n === 0) return z;
return succ(encode_numeral(n-1));
}
function pp_numeral(n) {
const pp_rest = r => r === 'x' ? 'f x' : `f (${r})`;
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
{ config, lib, pkgs, ...}:
{
services = {
gnome3.gnome-keyring.enable = true;
upower.enable = true;
dbus = {
enable = true;
socketActivated = true;
@noahhaasis
noahhaasis / Aufgabe4i.cs
Created February 9, 2021 12:25
Prog 2 Klausur Aufgabe 4
using System;
using System.Collections.Generic;
namespace Aufgabe4
{
partial class WarehouseMmgt
{
private List<Item> specialList;
public delegate void WM_InventoryCheck(Item i, ref bool addToList);