Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Module
Title produced by software
Date of computation
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Mar/18/t1332117987cr2ovfab21vzy3d.htm/, Retrieved Sun, 26 May 2024 08:40:31 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=164028, Retrieved Sun, 26 May 2024 08:40:31 +0000
QR Codes:

Original text written by user:hm @moderator: please rmvoee the code above. this is my 2nd try.{-# LANGUAGE Arrows,TypeOperators,EmptyDataDecls #-}module MaybeArrow where--import Control.Category hiding ((.),id)import Control.Arrowdata Thingdata FooThingdata SomeArrow b c--instance Control.Category.Category SomeArrow whereinstance Arrow SomeArrow whereget :: SomeArrow String (Maybe Thing)get = undefinedfoo :: [Thing] - FooThingfoo = undefined-- chainlink :: ... - ((a:ar,br) ~ (ar,b:br))chainlink :: Arrow (~ ) = (a ~ b) - (([a],[b])~ ([a],[b]))chainlink f = proc (a:ar,br) - do b - f - a returnA -)) = (a ~ b) - [a] - (() ~ [b])amap f as = proc x - do (_,bs) ) (arr id) $ replicate (length as) (chainlink f) ) - (as,[]) returnA - reverse bsgetAToZ :: SomeArrow () (Maybe FooThing)getAToZ = amap get [[s]|s arr (fmap foo . sequence)
IsPrivate?No (this computation is public)
User-defined keywordshm @moderator: please rmvoee the code above. this is my 2nd try.{-# LANGUAGE Arrows,TypeOperators,EmptyDataDecls #-}module MaybeArrow where--import Control.Category hiding ((.),id)import Control.Arrowdata Thingdata FooThingdata SomeArrow b c--instance Control.Category.Category SomeArrow whereinstance Arrow SomeArrow whereget :: SomeArrow String (Maybe Thing)get = undefinedfoo :: [Thing] - FooThingfoo = undefined-- chainlink :: ... - ((a:ar,br) ~ (ar,b:br))chainlink :: Arrow (~ ) = (a ~ b) - (([a],[b])~ ([a],[b]))chainlink f = proc (a:ar,br) - do b - f - a returnA -)) = (a ~ b) - [a] - (() ~ [b])amap f as = proc x - do (_,bs) ) (arr id) $ replicate (length as) (chainlink f) ) - (as,[]) returnA - reverse bsgetAToZ :: SomeArrow () (Maybe FooThing)getAToZ = amap get [[s]|s arr (fmap foo . sequence)
Estimated Impact28
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [] [DWpxDWIOWOYfZqyIAq] [1970-01-01 00:00:00] [821368db5c1be86b1abb47467ec59047] [Current]
Feedback Forum

Post a new message
Parameters (Session):
Parameters (R input):
R code (references can be found in the software module):