Electronics Circuits & Tutorials - Electronics Hobby Projects - A Complete Electronic Resource Centre
Electronics Circuits & Tutorials

Home About us Electronic Tutorials Engineering Hobby Projects Online Dictionaries Contact us
Tutorials
  • Basic/Beginners
  • Intermediate/Advance
  • Microcontrollers
  • Microprocessors
  • Electronics Symbols
  • Electronics Formulas
  • Dictionary of Units

     more....

Dictionaries
  • Electronics Terms
  • Abbreviations
  • Computer Terms
  • Physics Glossary
  • Science Glossary
  • Space & Solar Terms
  • Semiconductor Symbols / Abbreviation
  • Radio Terminology Bibliography

     more....

Projects
  • Engineering Projects
Home > Electronics Tutorials > Online Computer Terms Dictionary > h

Online Computer Terms Dictionary - H

horizontal loop combination ==>

tupling

A program transformation where several results are returned from a single traversal of a data structure. E.g.

	mean l = sum l / length l

		==>

	mean l = s/n
		 where
		 (s,n) = sumLen l

	sumLen []     = (0,0)
	sumLen (x:xs) = (s+x, n+1)
			where
			(s,n) = sumLen xs

In procedural languages this technique is known as horizontal loop combination because it uses one loop to calculate several results.

Another form of tupling transformation is used to avoid repeated evaluation where a function generates several identical calls to itself. By analysing the pattern of recursion (see descent function) it is possible to arrange for these identical calls to share results. E.g.

	fib 0 = 1
	fib 1 = 1
	fib n = fib (n-1) + fib (n-2)

		==>

	fib n = v where (_,v) = fibt n
	fibt 0 = (1,1)
	fibt n = (u+v,u) where (u,v) = fibt (n-1)

(1995-01-12)

 


Nearby terms: tuple « tuple calculus « Tuple Space Smalltalk « tupling » Turbo C » Turbo C++ » Turbo Debugger
 

Discover
  • C/C++ Language Programming Library
  • Electronic Conversions
  • History of Electronics
  • History of Computers
  • Elec. Power Standards
  • Online Calculator and Conversions
  • Electrical Hazards - Health & Safety
  • Datasheets
  • Quick Reference links
  • Electronics Magazines
  • Career in Electronics
  • EMS Post Tracking

     more......

Home Electronic Tutorials Engineering Hobby Projects Resources Links Sitemap Disclaimer/T&C

Copyright © 1999-2020 www.hobbyprojects.com  (All rights reserved)