English: Data flow in the mean1 example of b:en:Haskell/Arrow tutorial. Rectangles are arrows (rounded rectangles are arrows made with arr) and circles are other data flow split/merge points.
Haskell source code being represented:
Haskell/diagrams source code for generating the image:
{-# LANGUAGE NoMonomorphismRestriction #-}importDiagrams.PreludeimportDiagrams.Backend.Cairo.CmdLinemain=mainWith$pad1.05.centerXY$connDiagbaseDiag=hsep0.5.fmapcenterY$[anAmper#named"amp",anArrow"total"#named"sum"#centerX===strutY1===(aFunction"const 1"#named"one"|||strutX1|||anArrow"total"#named"count")#named"path2"#centerX,aFunction"/"#named"divide"]connDiag=baseDiag#connectPerim'baseConnOpts"amp""sum"(1/8@@turn)(1/2@@turn)#connectPerim'baseConnOpts"amp""one"(7/8@@turn)(1/2@@turn)#connectPerim'baseConnOpts"one""count"(0@@turn)(1/2@@turn)#connectPerim'baseConnOpts"sum""divide"(0@@turn)(3/8@@turn)#connectPerim'baseConnOpts"count""divide"(0@@turn)(5/8@@turn)wherebaseConnOpts=with&lengths.~large&shaftStyle%~lcbaseColour.lwveryThick&headStyle%~fc(darken0.2baseColour)aFunction::String->DiagramBaFunctions=roundedRect1.61.20.4#applyStyleinitStyle<>nudgedTexts#fcbaseColouranArrow::String->DiagramBanArrows=rect1.61.2#applyStyleinitStyle<>nudgedTextsanAmper::DiagramBanAmper=circle0.5#applyStyleinitStyle<>nudgedText"&&&"initStyle::StyleV2DoubleinitStyle=mempty#lcbaseColour#lwL0.1baseColour=mediumorchidnudgedText::String->DiagramBnudgedTexts=alignedText0.50.5s#font"monospace"#fontSize(local0.25)#bold#fcbaseColour
רישיון
אני, בעל זכויות היוצרים על עבודה זו, מפרסם בזאת את העבודה תחת הרישיון הבא:
ייחוס – יש לתת ייחוס הולם, לתת קישור לרישיון, ולציין אם נעשו שינויים. אפשר לעשות את זה בכל צורה סבירה, אבל לא בשום צורה שמשתמע ממנה שמעניק הרישיון תומך בך או בשימוש שלך.
שיתוף זהה – אם תיצרו רמיקס, תשנו, או תבנו על החומר, חובה עליכם להפיץ את התרומות שלך לפי תנאי רישיון זהה או תואם למקור.