lean4-htt/library/init/functor.lean
Daniel Selsam a9b01991c2 feat(frontends/lean/inductive_cmd): new frontend for the inductive cmd
Conflicts:
	src/frontends/lean/CMakeLists.txt
	src/frontends/lean/structure_cmd.h
2016-08-17 07:34:03 -07:00

15 lines
450 B
Text

/-
Copyright (c) Luke Nelson and Jared Roesch. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Luke Nelson and Jared Roesch
-/
prelude
structure [class] functor (f : Type → Type) : Type :=
(map : Π {a b: Type}, (a → b) → f a → f b)
attribute [inline]
definition fmap {F : Type → Type} [functor F] {A B : Type} (f : A → B) (a : F A) : F B :=
functor.map f a
infixr ` <$> `:100 := fmap