From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id UAA01823 for caml-redistribution; Thu, 8 Jun 1995 20:21:20 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.6.10/8.6.6) with ESMTP id TAA00602 for ; Thu, 8 Jun 1995 19:17:01 +0200 Received: from ns.ge.com (ns.ge.com [192.35.39.24]) by nez-perce.inria.fr (8.6.10/8.6.9) with ESMTP id TAA22178 for ; Thu, 8 Jun 1995 19:16:53 +0200 Received: from thomas.ge.com ([3.47.28.21]) by ns.ge.com (8.6.12/8.6.11) with ESMTP id NAA00222 for ; Thu, 8 Jun 1995 13:16:47 -0400 Received: from c0228.ae.ge.com (c0228.ae.ge.com [129.202.2.241]) by thomas.ge.com (8.6.12/8.6.12) with ESMTP id NAA01690 for ; Thu, 8 Jun 1995 13:16:45 -0400 Message-Id: <199506081716.NAA01690@thomas.ge.com> Received: from c0230.ae.ge.com by c0228.ae.ge.com with ESMTP (1.37.109.14/15.6) id AA155831787; Thu, 8 Jun 1995 13:16:27 -0400 Received: by c0230.ae.ge.com (1.37.109.16/16.2) id AA025851789; Thu, 8 Jun 1995 13:16:29 -0400 Date: Thu, 8 Jun 1995 13:16:29 -0400 From: U-E59264-Osman Buyukisik To: caml-list@pauillac.inria.fr Subject: vector dot multiply Sender: weis Hi, What would be 1). elegant 2). efficient way to write a "dot multiply" function in caml-light? This is what I came up with but I am hoping for a better one : let dot a b = let rec dot_aux a b i sum = if i< vect_length a then dot_aux a b (i+1) (sum +. (a.(i) *. b.(i)) ) else sum in dot_aux a b 0 0.0;; Also, is there a similar construct to Haskell array/list comprehensions? Thanks in advance. Osman