Real World OCaml (beta 2, community edition) by Yaron Minsky Anil Madhavapeddy Jason Hickey
Author:Yaron Minsky, Anil Madhavapeddy, Jason Hickey
Language: eng
Format: epub
Published: 2013-08-16T16:00:00+00:00
OCaml UTop ∗ classes/iter.topscript ∗ all code
Next, we'll define an actual iterator for lists. We can use this to iterate over the contents of our stack.
# class ['a] list_iterator init = object val mutable current : 'a list = init method has_value = current <> [] method get = match current with hd :: tl -> hd | [] -> raise (Invalid_argument "no value") method next = match current with hd :: tl -> current <- tl | [] -> raise (Invalid_argument "no value") end ;;
class ['a] list_iterator : 'a list -> object val mutable current : 'a list method get : 'a method has_value : bool method next : unit end
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12592)
Hello! Python by Anthony Briggs(9928)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9802)
The Mikado Method by Ola Ellnestam Daniel Brolund(9787)
Dependency Injection in .NET by Mark Seemann(9348)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8310)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7772)
Grails in Action by Glen Smith Peter Ledbrook(7705)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7567)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7172)
Microservices with Go by Alexander Shuiskov(6941)
Practical Design Patterns for Java Developers by Miroslav Wengner(6856)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6801)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6424)
Angular Projects - Third Edition by Aristeidis Bampakos(6217)
The Art of Crafting User Stories by The Art of Crafting User Stories(5733)
NetSuite for Consultants - Second Edition by Peter Ries(5663)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5478)
Kotlin in Action by Dmitry Jemerov(5074)
