Journal of Information Processing
Online ISSN : 1882-6652
ISSN-L : 1882-6652
 
Functional Reactive Animation with Functions of Time
Katsuhiro UenoHaru Karato
著者情報
ジャーナル フリー

2025 年 33 巻 p. 368-376

詳細
抄録

Motivated by the goal of making functional reactive programming straightforward and accessible even to beginners in functional programming, this paper proposes a compact yet novel framework that allows users to write reactive animations simply as compositions of functions of time. In this framework, any value that changes over time—including the entire animation and external states such as keyboard and mouse input—is represented by a function of time, making its time dependency explicit. Since time-varying values are ordinary functions, they are naturally composed using standard language constructs without requiring specialized combinators, in contrast to Elliott and Hudak's functional reactive programming and its successors. To encapsulate external states as declarative functions of time, the framework defines a time value as a dynamically extensible record consisting of values observed from the external world at specific moments. A field selector of such records has a function type of time and hence represents a time-varying value. The framework provides two primitives to organize the records: event for creating an external event sources and stream for accumulating past values. This paper describes the framework's design and implementation in Standard ML and demonstrates its descriptive power through examples.

著者関連情報
© 2025 by the Information Processing Society of Japan
前の記事 次の記事
feedback
Top