<commit_before>/-
Copyright (c) 2016 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: <NAME>
-/
prelude
import init.functor

set_option pp.all true

structure [class] applicative.{u₁ u₂} (f : Type.{u₁} → Type.{u₂}) extends functor f : Type.{max u₁+1 u₂} :=
(pure : Π {A : Type.{u₁}}, A → f A)
(seq  : Π {A B : Type.{u₁}}, f (A → B) → f A → f B)

attribute [inline]
definition pure {f : Type → Type} [applicative f] {A : Type} (a : A) : f A :=
applicative.pure f a

attribute [inline]
definition seq_app {A B : Type} {f : Type → Type} [applicative f] (g : f (A → B)) (a : f A) : f B :=
applicative.seq g a

infixr ` <*> `:2 := seq_app
<commit_msg>fix(library/init/applicative.lean): delete leftover from debugging<commit_after>/-
Copyright (c) 2016 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: <NAME>
-/
prelude
import init.functor

structure [class] applicative.{u₁ u₂} (f : Type.{u₁} → Type.{u₂}) extends functor f : Type.{max u₁+1 u₂} :=
(pure : Π {A : Type.{u₁}}, A → f A)
(seq  : Π {A B : Type.{u₁}}, f (A → B) → f A → f B)

attribute [inline]
definition pure {f : Type → Type} [applicative f] {A : Type} (a : A) : f A :=
applicative.pure f a

attribute [inline]
definition seq_app {A B : Type} {f : Type → Type} [applicative f] (g : f (A → B)) (a : f A) : f B :=
applicative.seq g a

infixr ` <*> `:2 := seq_app

{'fraction_non_alphanumeric': 0.1619958988380041, 'fraction_numerical': 0.010936431989063569, 'mean_word_length': 3.560747663551402, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4486244', 'n_tokens_mistral': 587, 'n_tokens_neox': 571, 'n_words': 227}