The ImperativeIO 펑터
The ImperativeIO 펑터
선택적인 ImperativeIO 펑터는 지연 함수형 스트림 I/O 시설을 써서 명령형 스타일 스트림 I/O 시설을 구현(파생)하는 데 사용할 수 있어요. 명령형 스타일에서 입력·출력 연산은 매번 새 스트림을 돌려주지 않고 인자에 부수 효과를 일으켜요. 대부분의 함수는 불법이거나 일관되지 않은 매개변수, I/O 실패, 닫힌 출력 스트림에 대한 I/O 시도 등 여러 이유로 Io 예외를 발생시킬 수 있어요. 필수인 BinIO와 TextIO 구조가 대부분의 상황에서 명령형 스타일 I/O를 제공하므로 ImperativeIO 펑터가 자주 필요하진 않아요. char나 Word8.word가 아닌 요소 타입의 I/O 시설이나 사용자 지정 I/O 프리미티브 기반 시설을 구성해야 할 때 유용해요.
출처: 문서
본문
시놉시스 (Synopsis)
functor ImperativeIO ( ... ) : IMPERATIVE_IO (* OPTIONAL *)
설명 (Description)
structure StreamIO : STREAM_IO
이 명령형 I/O 시설이 파생되는 특정 함수형 스트림 I/O 시설이에요. 대부분의 함수는 StreamIO의 함수를 호출하고 약간의 추가 부기만 해요.
더 알아보기 (Learn more)
- [ Top | Parent | Contents | Index | Root ] Generated April 12
- 2004 Last Modified April 15
- 1996 Comments to John Reppy. This document may be distributed freely over the internet as long as the copyright notice and license terms below are prominently displayed within every machine-readable copy. Copyright © 2004 AT&T and Lucent Technologies. All rights reserved. Permission is granted for internet users to make one paper copy for their own personal use. Further hardcopy reproduction is strictly prohibited. Permission to distribute the HTML document electronically on any medium other than the internet must be requested from the copyright holders by contacting the editors. Printed versions of the SML Basis Manual are available from Cambridge University Press. To order
- please visit www.cup.org (North America) or www.cup.cam.ac.uk (outside North America).