# Daydream

Paradigm(s) Declarative User:Hakerh400 2022 Not applicable Implemented `.txt`

Daydream is an esoteric programming language invented found by User:Hakerh400 in 2022.

## Overview

Let ${\displaystyle A}$ be an infinite list of natural numbers. The initial (${\displaystyle 0}$-th) element is ${\displaystyle 1}$. The ${\displaystyle n}$-th element is equal to the sum of all previous elements that are not divisible by ${\displaystyle n}$.

Source code consists of a single natural number ${\displaystyle n}$. The output are the first ${\displaystyle n}$ elements of sequence ${\displaystyle A}$, separated by spaces. Input is ignored.

## Background

The author saw the specification of this language in a dream. Despite the language being useless, the author decided to document it anyway.

## Implementation

Since the language is pointless, here is a pointless implementation in Haskell:

```i = id
k = const
(#) = flip
infixr 9 #
infixr 9 !
f g = g (f g)
(!) a b c = a c (b c)
t a b c = if a then b else c

main=getLine>>=(putStrLn.unwords.map show.f((take#).((map.(((#).((!)(t.(>0)).(((!).((#)((.).((sum.).