Documentation du modèle

Utilisation modifier

Ce modèle permet d'indenter des blocs, y compris ceux pour qui l'opérateur « : » ne fonctionne pas.

Syntaxe modifier

{{Indent|…}} ou {{Indent|1=…}}


Exemple modifier

{{Indent|Je suis indenté, donc j'existe !}}

renvoie :

Je suis indenté, donc j'existe !


{{Indent|1=
<source lang="haskell">
-- The type signature of 'ana':
ana :: (b->(a,b)) -> (b->Bool)-> b -> [a]   
-- Its definition:
ana unspool finished x = if finished x
                        then []
                        else  a : ana unspool finished y
                            where (a,y) = unspool x 
</source>
}}

renvoie le bloc formaté :

-- The type signature of 'ana':
ana :: (b->(a,b)) -> (b->Bool)-> b -> [a]   
-- Its definition:
ana unspool finished x = if finished x
                        then []
                        else  a : ana unspool finished y
                            where (a,y) = unspool x