小编use*_*652的帖子

Haskell - 可能/只是递归

我读了一些关于monad的帖子和博客,也许,只是,没什么..但是没有真正得到它:/在给定的代码中,我必须实现"latestActivity"函数.在我看来它应该工作,但我不知道如何正确使用"只是".也许有人能够帮助我.

module LatestActivity where
{-
Write a function 'latestActivity' that finds that last time a specific user
has sent a message. It is given a user name and a list of messages. A message
consists of the time it was sent, the user name of the user who sent it and
the message content. If there is no message from the given user in the list
the function yields 'Nothing'. Otherwise it yields 'Just' the latest time stamp
of the …
Run Code Online (Sandbox Code Playgroud)

monads haskell maybe

2
推荐指数
1
解决办法
506
查看次数

标签 统计

haskell ×1

maybe ×1

monads ×1