原帖由 sw2wolf 于 2009-6-15 08:50 發(fā)表
splitVerticallyBy,splitHorizontallyBy :: RealFrac r => r -> Rectangle -> (Rectangle, Rectangle)
splitVerticallyBy f = (mirrorRect *** mirrorRect) . splitHorizontallyBy f . mirrorRect
原帖由 sw2wolf 于 2009-6-15 12:58 發(fā)表
謝謝! 但我不明白如下定義中, 能解釋下嗎?
(***) :: a b c -> a b' c' -> a (b, b') (c, c')
原帖由 MMMIX 于 2009-6-15 14:48 發(fā)表
看不懂 (***) 的類型?對比看看下面兩個:
class Arrow a where
...
(***) :: a b c -> a b' c' -> a (b, b') (c, c')
...
instance Arrow (->) where
...
對于 instance Arr ...
歡迎光臨 Chinaunix (http://72891.cn/) | Powered by Discuz! X3.2 |