Scala中的递归DataType

时间:2018-02-18 07:10:21

标签: scala types higher-kinded-types f-bounded-polymorphism

嗨我想知道是否有人能解释我在Spark代码库中找到的这个签名。它看起来像一个递归数据类型,它用于构建查询计划,所以它有意义。有没有人对此有详细的了解?

src/main/resources/static/js/store/index.js

const storeFactory = (initialState=stateData) =>
    applyMiddleware(logger, saver)(createStore)(
        combineReducers({carsReducer}),
        (localStorage['redux-store']) ?
            JSON.parse(localStorage['redux-store']) :
            initialState
    )

1 个答案:

答案 0 :(得分:5)

F-Bounded Types (或自递归类型)。不是scala特定的,例如java中的等价物

public abstract class Enum<E extends Enum<E>> implements Comparable<E>

您可以阅读herehere