Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/vis15/src/compiler/mlton/list-pair.sml
ViewVC logotype

View of /branches/vis15/src/compiler/mlton/list-pair.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3800 - (download) (annotate)
Mon May 2 23:14:26 2016 UTC (4 years, 3 months ago) by jhr
File size: 542 byte(s)
  Fixes for building with MLton
(* list-pair.sml
 *
 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
 *
 * COPYRIGHT (c) 2016 The University of Chicago
 * All rights reserved.
 *)

signature LIST_PAIR_EXT =
  sig

    include LIST_PAIR

    val appi : (int * 'a * 'b -> unit) -> 'a list * 'b list -> unit

  end

structure ListPairExt : LIST_PAIR_EXT =
  struct

    open ListPair

    fun appi f (xs, ys) = let
	  fun appf (i, x::xs, y::ys) = (f(i, x, y); appf(i+1, xs, ys))
	    | appf _ = ()
	  in
	    appf (0, xs, ys)
	  end

  end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0