lean4-htt/library/init/functor.lean
Sebastian Ullrich 82657b3b64 refactor(library/compiler/inliner, library): replace inline command with attribute
sed -Ei 's/inline (protected )?(meta_)?definition (\S+)/\1\2definition \3 [inline]/' library/**/*.lean
2016-08-08 12:45:22 -07:00

14 lines
440 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 functor [class] (f : Type → Type) : Type :=
(map : Π {a b: Type}, (a → b) → f a → f b)
definition fmap [inline] {F : Type → Type} [functor F] {A B : Type} (f : A → B) (a : F A) : F B :=
functor.map f a
infixr ` <$> `:100 := fmap