Scala模式匹配闭包

时间:2016-02-03 07:49:18

标签: scala closures akka actor

我尝试模式匹配Closure。这可能吗?使用在函数中声明闭包的语法,我将闭包指定为include 'functions/crud_functions.php' $adds = get_all_adds(); foreach($adds as $add) { <tr> <td><?php echo $add['id']; ?></td> <td><?php echo $add['ad_title'];?></td> <td><?php echo $add['cat_id'];?></td> <td><?php echo $add['ad_description'];?></td> <td><?php echo $add['avatar'];?></td> <td><?php echo $add['price'];?></td> <td><?php echo $add['contact'];?></td> <td><?php echo $add['name'];?></td> <td><?php echo $add['time'];?></td> <td><a href="#">Edit </a> | <a href="#">Del </a></td> </tr>

即。     (call: => Unit)

1 个答案:

答案 0 :(得分:0)

而不是case (call: => Unit),请尝试case x: Function1[call, Unit]